|
Posted by Tyrone Slothrop on 01/22/07 15:14
On 22 Jan 2007 03:14:48 -0800, "luigi7up" <luigi7up@gmail.com> wrote:
>Hi, I'm having a problem with submiting a form.
>
>My form has two submit buttons:
>
><input name='task' value='refresh' type='image'
>src='images/osvjezi.jpg' />
><input name='task' value='add' type='image' src='images/osvjezi.jpg' />
>
>When I submit data I get it from $_POST['task'] without problem in
>Firefox but in IE there is no way.
>I found one solution somewhere on the web:
>
>
><input name= 'task[0]' value='refresh' type='image'
>src='images/osvjezi.jpg' />
><input name= 'task[0]' value='add' type='image'
>src='images/osvjezi.jpg' />
>
>To get $task value I should do following: $_POST['task'][0].
>
>This solution worked fine for a while. Now it doesn't work again...
>If firefox for $_POST['task'][0] i get good value but in IE I don't.
>
>If I print_r$_POST['task'] in IE I get: [task] => Array ( [0] => 18 )
>while I should be getting
>[task] => Array ( [0] => refresh )
>
>I could always name the buttons diferently but that isn't solution in
>striving for...:)
>
>Thanx
As I remember, when you use an image as a submit button, an array of
values is passed: both the x and y coodinates of the click and the
key name. Perhaps you are evaluating the wrong member of the array?
Navigation:
[Reply to this message]
|