RE: [PHP] search results - details
| From: | Martin Towell | Date: | Wed, 20 Feb 2002 04:31:04 +0000 |
| Subject: | RE: [PHP] search results - details | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-85496@lists.php.net to get a copy of this message | ||
I'm assuming you have an id in that table, so all you need to do is pass the
details page the id and the details page can then display whatever you want
it to display
-----Original Message-----
From: mm fernandez [mailto:birks1021@hotmail.com]
Sent: Wednesday, February 20, 2002 3:21 PM
To: php-general@lists.php.net
Subject: [PHP] search results - details
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 world's largest e-mail service with MSN Hotmail.
http://www.hotmail.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php