What encoding/decoding do I need when I pass a value through a form/URL?
<<<
I'm trying to use an <input type="image"> tag, but the How do I create arrays in a HTML <form>?
>>>

10.8 PHP and HTML
10 FAQ : Foire Aux Questions
 Manuel PHP

What encoding/decoding do I need when I pass a value through a form/URL?
-> I'm trying to use an <input type="image"> tag, but the
How do I create arrays in a HTML <form>?
How do I get all the results from a select multiple HTML tag?
How can I pass a variable from Javascript to PHP?

10.8.2 I'm trying to use an <input type="image"> tag, but the

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


<input type="image" src="image.gif" name="foo">
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'] .

<< I'm trying to use an <input type="image"> tag, but the >>
What encoding/decoding do I need when I pass a value through a form/URL? PHP and HTML How do I create arrays in a HTML <form>?