Re: Links and variables
| From: | Philip Olson | Date: | Wed, 09 Apr 2003 15:55:28 +0000 |
| Subject: | Re: Links and variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143102@lists.php.net to get a copy of this message | ||
On Wed, 9 Apr 2003, Ron Clark wrote:
> Hello all,
>
> How do you pass a variable using a link? I do not want a form with a
> button...
Hello, please slowly read this important manual page:
http://www.php.net/variables.external
In this case you are asking about the GET method. So:
http://www.example.com/index.php?color=red&fruit=apple
print $_GET['color'];
$color = $_GET['color'];
print $color;
etc.
GET can come from a form too but of course doesn't have
to.
Regards,
Philip