vibhaJ 126 Master Poster
vibhaJ 126 Master Poster

change line #6 to below code:

$path = "<a href=$link?id=".urlencode($id).">Inscripción curso</a>";
vibhaJ 126 Master Poster

Here i have attached complete code.
This code will get two image file and zip ait and download it.
run test.php file in browser and you will have one zip file.

vibhaJ 126 Master Poster

i was also having such requirement once.
Then what i have done is:
create zip file of multiple files using php and then download that zip file.
Thus user can have multiple files in one zip.

vibhaJ 126 Master Poster

Here is you code(with example form filled) to insert all URL at a time:

<?php
//File Snatcher 2.7
define('_ALLOWINCLUDE',0);
include 'setting.php';
$version = '2.7';
//////////////////////////////////////////////
//Do Not Change Below Here////////////////////
//////////////////////////////////////////////
if (function_exists('curl_init'))
{
	$snatch_system = 'curl';
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<title>File Snatcher <?php echo $version; ?> - &copy; http://noveis.net</title>
</head>
<body>

<div id="main">
<?php
$submit = $_POST['submit'];
if ($submit)
{
	if (isset($password))
	{
		if ($_POST['password'] != $password)
		{
			die('<p><strong>Password incorrect!</strong></p>');
			$error = true;
		}
	}
	
	if (!$defaultDest)
	{
		$defaultDest = 'snatched';
	}
	
	if (!file_exists($defaultDest))
	{
		mkdir($defaultDest);
	}
	
	$sizelimit = $sizelimit * 1024;
	
	$files = $_POST['file'];
	$news = $_POST['new'];
	$allfiles = $_POST['allfiles'];
	$separateby = $_POST['separateby'];
	if($allfiles != "")
	{
		$files = explode($separateby,$allfiles);
	}
	for($i=0;$i<count($files);$i++)
	{
		
		$file = trim($files[$i]);
		$uploadfile = explode('/', $file);
		$filename = array_pop($uploadfile);
		
		$newfilename = $news[$i];
		
		if (!$newfilename)
		{
			$newfilename = $filename;
		}
		
		if (!isset($file))
		{
			echo '<p><strong>Please enter a URL to retrieve file from!</strong></p>';
			$error = true;
		}
		
		if (!isset($newfilename))
		{
			echo '<p><strong>Please enter a new file name!</strong></p>';
			$error = true;
		}
		
		if ($error == false)
		{
			$dest = $defaultDest;
			$ds = array($dest, '/', $newfilename);
			$ds = implode('', $ds);
			$newname_count = 0;
			if (file_exists($ds))
			{
				echo '<p><strong>File already exists!</strong></p>';
				$newname_count++;
				$newfile = array($newname_count, $newfilename);
				$newfile = implode('~', $newfile);
				$newfile_ds = array($dest, '/', $newfile);
				$newfile_ds = implode('', $newfile_ds);
				while($renamed == false)
				{
					if (file_exists($newfile_ds))
					{
						$newname_count++;
						$newfile = array($newname_count, $newfilename);
						$newfile = implode('~', $newfile);
						$newfile_ds = array($dest, '/', $newfile);
						$newfile_ds = implode('', $newfile_ds); …
Viruthagiri commented: Thanks buddy +1
vibhaJ 126 Master Poster

Here is code for index.php.
check it, hope it is what you want.

<?php
//File Snatcher 2.7
define('_ALLOWINCLUDE',0);
include 'setting.php';
$version = '2.7';
//////////////////////////////////////////////
//Do Not Change Below Here////////////////////
//////////////////////////////////////////////
if (function_exists('curl_init'))
{
	$snatch_system = 'curl';
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<title>File Snatcher <?php echo $version; ?> - &copy; http://noveis.net</title>
</head>
<body>

<div id="main">
<?php
$submit = $_POST['submit'];
if ($submit)
{
	if (isset($password))
	{
		if ($_POST['password'] != $password)
		{
			die('<p><strong>Password incorrect!</strong></p>');
			$error = true;
		}
	}
	
	if (!$defaultDest)
	{
		$defaultDest = 'snatched';
	}
	
	if (!file_exists($defaultDest))
	{
		mkdir($defaultDest);
	}
	
	$sizelimit = $sizelimit * 1024;
	
	$files = $_POST['file'];
	$news = $_POST['new'];
	
	for($i=0;$i<count($files);$i++)
	{
	
	$file = $files[$i];
	$uploadfile = explode('/', $file);
	$filename = array_pop($uploadfile);
	
	$newfilename = $news[$i];
	
	if (!$newfilename)
	{
		$newfilename = $filename;
	}
	
	if (!isset($file))
	{
		echo '<p><strong>Please enter a URL to retrieve file from!</strong></p>';
		$error = true;
	}
	
	if (!isset($newfilename))
	{
		echo '<p><strong>Please enter a new file name!</strong></p>';
		$error = true;
	}
	
	if ($error == false)
	{
		$dest = $defaultDest;
		$ds = array($dest, '/', $newfilename);
		$ds = implode('', $ds);
		$newname_count = 0;
		if (file_exists($ds))
		{
			echo '<p><strong>File already exists!</strong></p>';
			$newname_count++;
			$newfile = array($newname_count, $newfilename);
			$newfile = implode('~', $newfile);
			$newfile_ds = array($dest, '/', $newfile);
			$newfile_ds = implode('', $newfile_ds);
			while($renamed == false)
			{
				if (file_exists($newfile_ds))
				{
					$newname_count++;
					$newfile = array($newname_count, $newfilename);
					$newfile = implode('~', $newfile);
					$newfile_ds = array($dest, '/', $newfile);
					$newfile_ds = implode('', $newfile_ds);
				}
				else
				{
					$renamed = true;
				}
			}
			$newfilename = $newfile;
			$ds = $newfile_ds; …
Viruthagiri commented: one word... vibhadevit is awesome +1
vibhaJ 126 Master Poster

create one session array.
when user click on link you can pass veh_id to ajax page.
where in ajax page you will add veh_id in session array.
And when user checkout it will use session array.

vibhaJ 126 Master Poster

This code will generate your requires output.

<?	
	$reminder ="300"; // 5 minutes * 60 seconds (to convert to seconds) 
	$timefromreminder = date('h:i:s', strtotime("-$reminder seconds")); 
	// this will give 5 minutes minus the current time 
	//but what i am looking for is to be able to do this 
	
	$event_start_time = '11:45:00';
	echo '<br />Start Time : '.date('H:i:s',strtotime($event_start_time)); 
	echo '<br />End Time : '.date('H:i:s', strtotime("-$reminder seconds",strtotime($event_start_time))); 
	exit;	

?>
vibhaJ 126 Master Poster

code with BR.

<?php 

$msg = "Message from Platform Form<br />";
$msg .= "Aspirant's Background:\t $_POST[aspirant_background]<br />";
$msg .= "Aspirant's Position:\t $_POST[aspirant_email3]<br />";
$msg .= "Aspirant's Offer:\t $_POST[aspirant_email2]<br />";
$msg .= "Aspirant's email:\t $_POST[aspirant_email]<br />";

$fname = $_FILES['aspirant_photo']['name'];		
$uploadfile = 'upload/'.$fname;
if(move_uploaded_file($_FILES['aspirant_photo']['tmp_name'], $uploadfile)) 
{
	$imgUrl = '<img src="'.'http://www.youngvotersinitiative.org/'.$uploadfile.'">'; 
	$msg .= "Aspirant's Photo:\t ".$imgUrl."<br />";
}				

$to = "walterosadebe@youngvotersinitiative.org";				
$subject = "Platform Submission";
$mailheaders = "From: Young Voters Initiative <> \n";
$mailheaders .= "Reply-To: $_POST[sender_email]\n\n";
$mailheaders .= "MIME-Version:1.0\nContent-type:text/html; charset=ISO-8859-1\n";
mail($to, $subject, $msg, $mailheaders);

?>
vibhaJ 126 Master Poster

create new folder at root named : 'upload'.
Place below code for mail sending.

<?php 

$msg = "Message from Platform Form\n";
$msg .= "Aspirant's Background:\t$_POST[aspirant_background]\n";
$msg .= "Aspirant's Position:\t$_POST[aspirant_email3]\n";
$msg .= "Aspirant's Offer:\t$_POST[aspirant_email2]\n";
$msg .= "Aspirant's email:\t$_POST[aspirant_email]\n";

$fname = $_FILES['aspirant_photo']['name'];		
$uploadfile = 'upload/'.$fname;
if(move_uploaded_file($_FILES['aspirant_photo']['tmp_name'], $uploadfile)) 
{
	$imgUrl = '<img src="'.'http://www.youngvotersinitiative.org/'.$uploadfile.'">'; 
	$msg .= "Aspirant's Photo:\t".$imgUrl."\n";
}				

$to = "walterosadebe@youngvotersinitiative.org";				
$subject = "Platform Submission";
$mailheaders = "From: Young Voters Initiative <> \n";
$mailheaders .= "Reply-To: $_POST[sender_email]\n\n";
mail($to, $subject, $msg, $mailheaders);

?>

let me know ur output.

vibhaJ 126 Master Poster

Hope this code will help..
u can modify it as per ur requirement.

<HTML>
<HEAD>Try</HEAD>
<BODY>
<form NAME="myForm">
<input TYPE="button" VALUE="Line Break" ONCLICK="insertString('</br>')">
<input TYPE="button" VALUE="H1 Tag" ONCLICK="insertString('<h1></h1>')">
<br>
<textarea NAME="myTextArea" ROWS="5" COLS="100"></textarea> 
</form>
</body>
</html>
<script LANGUAGE="Javascript">
var globalCursorPos=0; // global variabe to keep track of where the cursor was

function caret(node) {
 //node.focus(); 
 /* without node.focus() IE will returns -1 when focus is not on node */
 if(node.selectionStart) return node.selectionStart;
 else if(!document.selection) return 0;
 var c		= "\001";
 var sel	= document.selection.createRange();
 var dul	= sel.duplicate();
 var len	= 0;
 dul.moveToElementText(node);
 sel.text	= c;
 len		= (dul.text.indexOf(c));
 sel.moveStart('character',-1);
 sel.text	= "";
 return len;
}

function setCursorPos() { 
 globalCursorPos = caret(myForm.myTextArea); 
}

function insertString(stringToInsert) {
setCursorPos();
 var firstPart = myForm.myTextArea.value.substring(0, globalCursorPos);
 var secondPart = myForm.myTextArea.value.substring(globalCursorPos, myForm.myTextArea.value.length);
 myForm.myTextArea.value = firstPart + stringToInsert + secondPart;
}
</SCRIPT>
DarkBerzerk™ commented: Answered The Question! +0
vibhaJ 126 Master Poster

$_POST[aspirant_photo] doesn't mean uploaded image will be directly attached..

you have to upload that photo to the server using move_uploaded_file.
Then you can give <img src="url of uploaded photo"> in message.

sparkles_links commented: You are the MAM +1
vibhaJ 126 Master Poster
$query5="INSERT INTO $clean_title (recnum,lname,fname,first,credit) VALUES ('$record_number1','$last_name','$first_name','$new','$credit')";
mysql_query($query5) or die(mysql_error());

there is no php code to execute query in your given code.
same for $query4.

vibhaJ 126 Master Poster

Try this :

<?php
$new = htmlspecialchars("'The <font> tag is awesome'", ENT_QUOTES);
echo $new; 
?>
vibhaJ 126 Master Poster

Try this code.

<?php
while($rows=mysql_fetch_array($result))
{
	$style = '';
	if($rows['designation']=="Teamleader")
		$style = 'style="color:#0000FF;"';
	if($rows['designation']=="Manager")
		$style = 'style="color:#cc0000;"';
	
echo "<option value=".$rows['username']." ".$style.">".$rows['username']."</option>";
}
?>
vibhaJ 126 Master Poster

Hi andydeans,

Just fix width of the container which is having this note table.
(i.e. parent tag of <table width="50%">)
not in percentage but in pixel.

vibhaJ 126 Master Poster

In second code line number 11 foreach loop is wrong:

$selstatus = $_POST['selstatus'];
foreach($selstatus as $key => $value)
{
    echo $key . ': ' . $value . '<br>';
}