RE: [PHP] link question

From: Date: Wed, 22 Oct 2003 20:39:17 +0000
Subject: RE: [PHP] link question
Groups: php.general 
Request: Send a blank email to php-general+get-167165@lists.php.net to get a copy of this message
<a href="path/to/file.php?var=<?php echo $val; ?>">link</a> And on the receiving page access var via $_GET['var'] Of course, how you actually append the value in question to your link will depend on your own code. I use ADOdb for all my db work, so for me it would be something like this: echo '<table>'; while (!$rs->EOF) { echo '<tr> <td><a href="/path/to/file.php?var='.$rs->fields['unique_key'].'">link</a></td> <td>more table cells...</td> </tr> $rs->MoveNext(); } echo '</table>'; Cheers, Pablo -----Original Message----- From: Davy Campano [mailto:dcampano@leeuniversity.edu] Sent: Wednesday, October 22, 2003 1:30 PM To: php-general@lists.php.net Subject: [PHP] link question I have a php page that makes a table from data in a mySQL database. What I want to do is make the first entry in the table be a Unique key that is a link, that when you click on this key it opens another page with some more information. Basically I am trying to figure out how to pass this key from this page to the next. Thanks for any help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#167165) next »