Re: getting a details-page
| From: | Johannes Janson | Date: | Wed, 12 Sep 2001 10:06:18 +0000 |
| Subject: | Re: getting a details-page | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-12366@lists.php.net to get a copy of this message | ||
Hi,
>
> I have a problem:
> with a mysql_query I get the results of a table field into a list page.
> Is it possible to use this result (as link) to open a new page where the
> detailed results of each row are shown?
So you select one field and list it with a while-loop?
Assuming this you can make a link like this:
while ($row = mysql_fetch_array($result)){
echo $row[field]." <a
href=\"show_details.php?criteria=$row[field]\">Details</a>";
}
and on show_details.php something like this:
$query = "SELECT * FROM table WHERE criteria='$criteria'";
$result = mysql_query($query);
hope this is what you want
cheers
Johannes