Jump to content
Web Marketing Help Forum
Sign in to follow this  
zoltaker

help on this tag <input type="image">

Recommended Posts

Hi...

 

I'm trying to use an tag, but the $foo.x and $foo.y variables aren't available. $_GET['foo.x'] isn't existing either. Where are they?

 

Thanks for any reply....

Share this post


Link to post
Share on other sites

When submitting a form, it is possible to use an image instead of the standard submit button with a tag like:

 

 

When the user clicks somewhere on the image, the accompanying form will be transmitted to the server with two additional variables: foo.x and foo.y.

 

Because foo.x and foo.y would make invalid variable names in PHP, they are automagically converted to foo_x and foo_y. That is, the periods are replaced with underscores. So, you'd access these variables like any other described within the section on retrieving variables from outside of PHP. For example, $_GET['foo_x'].

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×