Page 1 of 1

Please help with previous/next link

Posted: Fri Apr 11, 2003 10:04 am
by iceburg
I am having real trouble, I have looked through numerous tutorials on previous/next links but cant get them to work. So I have included my code below and can someone PLEASE alter it and add the previous/next links.

Thanks

Tim

Code: Select all

<?php

$connection = mysql_connect ('localhost', 'user', 'pass');
if ($connection == false){
  echo mysql_errno().": ".mysql_error()."<BR>";
  exit;
}  

$query = "select * from jobs WHERE category='Biotechnology' ";
$result = mysql_db_query ("employment", $query);

if ($result){
  

  $numOfRows = mysql_num_rows ($result);
  for ($i = 0; $i < $numOfRows; $i++){
    $job_title = mysql_result ($result, $i, "job_title");
	$description = mysql_result ($result, $i, "description");
	$employer = mysql_result ($result, $i, "employer");
	$address = mysql_result ($result, $i, "address");
	$city = mysql_result ($result, $i, "city");
	$province = mysql_result ($result, $i, "province");
	$telephone = mysql_result ($result, $i, "telephone");
	$email = mysql_result ($result, $i, "email");
	$website = mysql_result ($result, $i, "website");
	$experience = mysql_result ($result, $i, "experience");
	$salary = mysql_result ($result, $i, "salary");
	$id = mysql_result ($result, $i, "id");
	
   
	
  
    echo "<table cellpadding=0 cellspacing=0 border=0><tr><td width=20></td><td 

width=500><font class=smalllogo2><b>Job Number</b> : $id<br><b>Position</b> : 

$job_title<br>";
    echo "<b>Position Description</b> : $description<br>";
	echo "<b>Employer</b> : $employer<br>";
	 echo "<b>Street Address</b>: $address<br>";
	 echo "<b>City</b> : $city<br>";
	 echo "<b>Province</b> : $province<br>";
	 echo "<b>Telephone</b> : $telephone<br>";
	 echo "<b>Contact Person</b> : $email<br>";
	 echo "Website Address: <a href=http://$website>$website</a><br>";
	 echo "<b>Experience & Notes</b> : $experience<br>";
	 echo "<b>Salary</b> : $salary</td></tr></table><br>";
	
	
	
  }

 
	
}
else{
  echo mysql_errno().": ".mysql_error()."<BR>";
}

mysql_close ();
?>
<?PHP
echo "<select name=id><option value="">Please select position<option value=$id>$id - 

$employer - $job_title";

?>
?>

Posted: Fri Apr 11, 2003 10:53 am
by AVATAr
iceburg, this is not a "Please alter", "Please do it for me", try to do it yourself, try searching this forum... there are a lot of stuff for this solution in this forum...

After you try to do it, if it doesnt work.. try here and ask for help

regards

Posted: Fri Apr 11, 2003 11:02 am
by iceburg
I am sorry I have tried the tutorials and articles and I am just totally confused.