Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

register_globals: passing >1 possible value

Status
Not open for further replies.

csbdeady

Programmer
May 18, 2002
119
GB
Hi there

I've got a bit of HTML embedded in a PHP file something like:

<a href=&quot;abc.php?action=1&quot;>buy this product</a>
<a href=&quot;abc.php?action=2&quot;>buy this one</a>
<a href=&quot;abc.php?action=3&quot;>buy the third one</a>

With register_globals on I can read $action in abc.php to find out what was selected.

With register_globals off I can't see $action and presumably must set a session variable... the only thing is I can't work out in this case how to set the session variable at the moment the user clicks on the link.

I don't want to replace the links with check boxes and then a &quot;submit&quot; button as that will take the user two clicks to get to the abc.php page rather than the one I want.

All help appreciated:)

Thanks
-Colin
 
Hi again

OK after a bit more searching I found the answer - posted here in case someone else has the same query.

In abc.php I use

$_GET['action']

instead of

$action

-Colin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top