search results - details
| From: | mm fernandez | Date: | Wed, 20 Feb 2002 04:21:14 +0000 |
| Subject: | search results - details | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-85495@lists.php.net to get a copy of this message | ||
hi,
I'm working on a search results page. actually i have my search form and search results page working fine already. but i want to add something on the "results page". my search "results page" shows the following fields: lastname, firstname, middlename, yeargrad.
what i want is that the lastname results should be linked to a "more details" page. so for example, if i have a search result with 'garcia' as the lastname..i click on that and i should be transferred to a page showing me more details of that garcia..showing me more than just his/her firstname,middlename, and yeargrad.
What should i use as my sql statement for the "more details" page? And how do i tell the detail page to show which records to retrieve and display?
By the way, here's part of the code that i have for the results page:
// <?php
//
// include_once ("connect.php");
//
// $sql = "Select * from alumni where yeargrad = ('$search') OR lastname like ('%$search%') OR country like ('%$search%') order by lastname";
// $rs = mysql_query($sql,$db);
//
// if (!$r = mysql_fetch_object($rs)) {
// echo "No record found. Please try again.";
// exit;
// }
//
// $rs = mysql_query($sql,$db);
// while ($r = mysql_fetch_object($rs)){
// echo "<br>$r->lastname";
// }
// ?>
if anyone can please help me. thanks.
// MM Fernandez
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com