Re: Passing Variables

From: Date: Sat, 01 Feb 2003 19:22:52 +0000
Subject: Re: Passing Variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-133901@lists.php.net to get a copy of this message
On Sat, 1 Feb 2003, Beauford.2002 wrote: > Hi, > > Is there a way to pass a variable to a PHP script without using a form? I > want to put several links on my main page that when clicked on goes to a PHP > script - depending on what link was selected, will determine what part of > the PHP script gets executed. Yes, use GET: <a href="foo.php?fruit=apple">eat an apple</a> See also if() and switch() http://www.php.net/else http://www.php.net/switch http://www.php.net/variables.external print $_GET['fruit']; Regards, Philip

« previous php.general (#133901) next »