there are no white spaces, and i did as you said, it now executes to the error.php file like it did before. This then displays:
Unfortunately an error has occured! Please follow the link back to the main page to try again
which is an error msg from the error.php file.
<?
include 'db_param.php';
include 'common.php';
if (!isset($_jnum) || $jnum == "")
{
header("Location:error.php");
exit;
}
$link = mysql_connect($db_h, $db_u, $db_p) or exit ("Unable to connect!");
mysql_select_db($db) or exit ("Could not connect to database");
$sql = "SELECT job.j_title, job.j_num, depart.dep, location.location, salary.salary, job.j_resp, job.j_req, job.j_cont, job.cont_mail, job.posted from job, depart, location, salary WHERE depart.d_id = job.depart AND location.l_id = job.location AND salary.s_id = job.salary AND job.j_num = '$jnum'";
$query = mysql_query($sql) or exit ("Error in query: $sql. " . mysql_error());
if (mysql_num_rows($query) <= 0)
{
header("Location:error.php");
exit;
}
else
{
list($jtitle, $jnum, $department, $location, $salary, $jresp, $jreq, $jcont, $contmail, $posted) = mysql_fetch_row($query);
mysql_close($link);
?>
<? include 'header.inc.php'; ?>
<br>
<!-- print job details -->
<b>Job Title:</b> <? echo $jtitle; ?>
<p>
<b>Job number:</b> <? echo $jnum; ?>
<p>
<b>Department:</b> <? echo $department; ?>
<p>
<b>Location:</b> <? echo $location; ?>
<p>
<b>Salary:</b> <? echo $salary; ?>
<p>
<b>Responsibilities:</b> <? echo $jresp; ?>
<p>
<b>Qualifications:</b> <? echo $jreq; ?>
<p>
<b>Contact:</b> <a href=mailto: <? echo $contmail; ?> <? echo $jcont; ?></a>
<p>
<b>Posted on:</b> <? echo form_d($posted); ?>
<p>