Re: Hyperlinking to a new page
| From: | Cal Evans | Date: | Thu, 09 Oct 2003 21:57:14 +0000 |
| Subject: | Re: Hyperlinking to a new page | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-30948@lists.php.net to get a copy of this message | ||
script.php?key=value&key=value&key=value
i.e.
http://www.yourserver.com/yourscript.php?city=mobile&state=al
or
http://www.yourserver.com/yourscript.php?cityid=666
This will allow you to use $_REQUEST['city'] in the page you are calling to retrieve the city from the first example. You can also use $_GET['city'] but I use $_REQUEST because it contains both $_POST and $_GET.
The variable names are case sensitive and must be exactly what you put on the URL.
$_REQUEST['City'] != $_REQUEST['city']
HTH,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of your IT,
* So you can take care of your business.
*
* I think inside the sphere.
Rob wrote:
I believe what you want to do is just add the variable onto the URL, like this... script.php?variable or script.php?variable&variable Does that help? Thanks, Robert Gillen http://www.GifArt.com ----- Original Message ----- From: Shiloh Madsen To: php-db@lists.php.net Sent: Thursday, October 09, 2003 3:41 PM Subject: [PHP-DB] Hyperlinking to a new page Ok, I know this should be easy, but im just blanking on how to do it. I have a webpage where you put in a city name, and it queries a database of all the cities in the US and brings back all cities matching that name. This part works just fine. What I want to do now is to create a hyperlink for each city name which, when clicked on will then call up a second page listing the details of that city. What I need to do is pass this page the city id (or any other identifying variable) to the detail page, but I cant for the life of me remember how to pass the data from one page to another outside of a form. Any help would be appreciated. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php