Passing on unique session variables to the resumerviewer.php page -
<?php //get data session_start(); $button = $_get['submit']; $search = $_get['search']; if (!$button) echo "you didnt submit keyword"; else { if (strlen($search)<=2) echo "search term short"; else { echo"you searched <b>$search</b><hr size='1'>"; //connect database include("connect.php"); // bit of filtering $search = strtoupper($search); $search= strip_tags($search); $search = trim ($search); $keywords = $getrow['preferedlocation']; //explode our search term $search_exploded = explode(" ",$search); foreach ($search_exploded $search_each) { //construct query $x++; if ($x==1) $construct .= "preferedlocation '%$search_each%'"; else $construct .= " or preferedlocation '%$search_each%'"; } //echo out construct $construct = "select * jobseekers $construct"; $run = mysql_query($construct); $foundnum = mysql_num_rows($run); if ($foundnum==0) echo "no results found."; else { echo "$foundnum results found!<p>"; while ($runrows = mysql_fetch_assoc($run)) { $jobseekerid = $runrows['jobseekerid']; $jobseekeremail = $runrows['jobseekeremail']; $jobseekerpassword = $runrows['jobseekerpassword']; $jobseekertitle = $runrows['jobseekertitle']; $jobseekerfirstname = $runrows['jobseekerfirstname']; $jobseekerlastname = $runrows['jobseekerlastname']; $jobseekeraddress = $runrows['jobseekeraddress']; $jobseekerphoneno = $runrows['jobseekerphoneno']; $jobseekerdob = $runrows['jobseekerdob']; $jobseekergender = $runrows['jobseekergender']; $imagelocation = $runrows['imagelocation']; $preferedlocation = $runrows['preferedlocation']; $preferedcategory = $runrows['preferedcategory']; $_session['jobseekerid']= $jobseekerid; echo " <b>$jobseekerid <b>$jobseekerfirstname $jobseekerlastname </b><br> $jobseekeremail<br> $jobseekeraddress<br> $jobseekerphoneno<br> <br><a href='resumeviewer.php'> resume information</a></p>"; } } } } ?>
you should pass jobseekerid
resumerviewer.php
echo " <b>$jobseekerid <b>$jobseekerfirstname $jobseekerlastname </b><br> $jobseekeremail<br> $jobseekeraddress<br> $jobseekerphoneno<br> <br><a href='resumeviewer.php?id=" . $jobseekerid . "'> resume information</a></p>";
in resumerviewer.php
:
$run = mysql_query('select * `jobseekers` `jobseekerid`=' . intval($_get['id'])); if(mysql_num_rows($run)) { $row = mysql_fetch_assoc($run); print_r($row); }
Comments
Post a Comment