Bee Posted April 17, 2006 Share Posted April 17, 2006 Hi, I wonder if you can help with this please:I want to get a value in HTML and assign it to PHP variable when user clicks on a link. The link value is not the value I want to pass to the php variable.for example:<a href="something.html"><some way to declare number = 1 in html><a href="something.html"><some way to declare number = 2 in html>if user clicks on the first link phpVar will equal 1....etc.phpVar = number; Thank you in advance,B Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted April 17, 2006 Share Posted April 17, 2006 The only to pass a variable to PHP with a link is by the url like so:[code]<a href="something.php?var=1">Send Var1</a><a href="something.php?var=2">Send Var2</a>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.