the first php page coding:::::::::::::::::::::::::::::
-------------------------------------------------
<?php
//store the data in session
$appdate=date('Y-m-d');
$host="localhost"; // Host name
$hostusername="root"; // Mysql username
$hostpassword="root"; // Mysql password
$db_name="jobdatabase"; // Database name
$tbl_name="appsent"; // Table name
$varholder=$_SESSION['myusername'];
$con= mysql_connect("localhost","root","root");
mysql_connect("$host", "$hostusername", "$hostpassword")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$result=mysql_query("SELECT * FROM appsent WHERE employer='$_SESSION[myusername]' ");
if (!$result) {
echo 'Could not run query: '. mysql_error();
exit;
}
$row=mysql_fetch_row($result);
//store session for the displayed application
echo '<strong>Post Applied for: </strong>'.$row[1].'<br/>';
echo '<strong>Applied by: </strong>'.$row[2].'<br/>';
echo '<strong>Requirement: </strong>'.$row[4].'<br/>';
echo '<strong>Location: </strong>'.$row[5].'<br/>';
echo '<strong>Interview Question: </strong>'.$row[6].'<br/>';
echo '<strong>Interview answer: </strong>'.$row[7].'<br/>';
echo '<strong>Area of Specification: </strong>'.$row[8].'<br/>';
echo '<strong>Closing Date: </strong>'.$row[10].'<br/>';
echo "<strong>Jobseeker's CV: </strong>".'<br/>'.$row[9].'<br/>';
$paf=$row[1] ;
$_SESSION['paf']=$paf;
echo $paf;
$pab=$row[2] ;
$_SESSION['pab']=$pab;
$pem=$row[3] ;
$_SESSION['pem']=$pem;
$preq=$row[4] ;
$_SESSION['preq']=$preq;
$ploc=$row[5] ;
$_SESSION['ploc']=$ploc;
$piq=$row[6] ;
$_SESSION['piq']=$piq;
$pia=$row[7] ;
$_SESSION['pia']=$pia;
$paos =$row[8] ;
$_SESSION['paos']=$paos;
$pcv =$row[9] ;
$_SESSION['pcv']=$pcv;
$pcd =$row[10] ;
$_SESSION['pcd']=$pcd;
$padt =$row[10] ;
$_SESSION['padt']=$padt;
echo '<form name="form1" method="post" action="appaccept.php">
<input type="submit" name="Submit" value="Accept">
<input name="Reject" type="submit" id="Reject" value="Reject">
</form>';
echo '<a href="#">'.'<img src="accept.png" width="130" height="50" />'.'</a>'.'<a href="#">'.'<img src="reject.png" width="130" height="50" />'.'</a> ';
echo '<hr>';
//----------------------------
mysql_close($con);
?>
---------- Post added at 11:57 PM ---------- Previous post was at 11:55 PM ----------
the second php page where i was trying to call the session data:::::::::::::::::::::::::::::
--------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------
<?php
if(isset($_POST['Submit']))
{
$host="localhost";
$hostusername="root";
$hostpassword="root";
$db_name="jobdatabase";
$tbl_name="appconfirmation";
$con= mysql_connect("localhost","root","root");
mysql_connect("$host","$hostusername","$hostpasswo rd") or die("cannot connect");
mysql_select_db("$db_name") or die("cannot select DB");
$thisdate=date('Y-m-d');
$_POST=$_SESSION;
$thepaf=$_SESSION['paf']; echo $thepaf;
$thepab=$_SESSION['pab'];
$thepem=$_SESSION['pem'];
$thepreq=$_SESSION['preq'];
$theploc=$_SESSION['ploc'];
$thepiq=$_SESSION['piq'];
$thepia=$_SESSION['pia'];
$thepaos=$_SESSION['paos'];
$thepcv=$_SESSION['pcv'];
$thepcd=$_SESSION['pcd'];
$thepadt=$_SESSION['padt'];
//start off querying
$insertSQL= "INSERT INTO appconfirmation (postapplied,jobseeker,employer,requirement,locati on,interquest,interans,aofspeci,jobseekercv,status ,appdatecon)
VALUES('$thepaf','$thepab','$thepem','$thepreq','$ theploc','$thepiq','$thepia','$thepaos','$thepcv', 'accept','$thisdate')";
if (!mysql_query($insertSQL,$con))
{
die('Error: ' . mysql_error());
}
echo '<strong><font color="#FF0000">'."Application approved!!!"." ".':'.'</font></strong> ';
echo "<br />";
echo '<br>To view stuff, <a href="#">click here</a>.';
//end here
mysql_close($con);
}
//another one
?>
---------- Post added 09-27-2011 at 12:01 AM ---------- Previous post was 09-26-2011 at 11:57 PM ----------
anyone to help me out................?????