I have the code below that works fine and directs me to viewprofile.php.
<?php
$db = mysql_connect("localhost", "user","pass");
mysql_select_db("employment",$db);
$result = mysql_query("SELECT * FROM jobs ORDER BY category",$db);
if ($result) {
while ($r = mysql_fetch_array($result)) {
$job_title=$r["job_title"];
$employer = $r["employer"];
echo "<LI><A
HREF=\"http://localhost/employment/viewprofile.php?job_title=$job_title\">$job_title,$e
mployer</A>";
}
}
?>
That works fine, now I have the viewprofile.php looking like:
<?php
$db = mysql_connect("localhost", "user","pass");
mysql_select_db("employment",$db);
if(isset($viewid))
$query= ("SELECT * FROM jobs WHERE category=$id");
$numOfRows = mysql_num_rows ($result);
for ($i = 0; $i < $numOfRows; $i++){
$job_title = mysql_result ($result, $i, "job_title");
$name = "$job_title";
echo $name
?>
And it is not showing the record details, what am I doing wrong?
Tim