Something like the following HTML :
<a href="foo.php?var=1"><img src="img1.gif"></a>
<a href="foo.php?var=2"><img src="img2.gif"></a>
<a href="foo.php?var=3"><img src="img3.gif"></a>
And in foo.php have :
print $var; // 1 or 2 or 3
Also consider the following :
<a href="<?php echo $PHP_SELF; ?>?var=1"><img src="img1.gif"></a>
To have it load the current page rather then foo.php.
regards,
philip
On Mon, 9 Apr 2001, Victor wrote:
> Hello,
>
> Is there any (easy) way to let a user to set the value of a
> variable by simply clicking on a hyperlink on a web page?
> I mean if I have a 3 links on a page if the user clicks on image1 to
> set a variable $var=1,if clicks on image2 to set it as
> $var=2,etc.
>
> Any suggestions (including RTFMs ;-)) are wellcome.
>
>
> Best regards,
> Victor
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]