MoZo1 Posted September 15, 2006 Share Posted September 15, 2006 I have a form with a lot of image type submit buttons, and one drop-down list. The drop down list's name is amount, and the submit "images" have the same name, task2 (without _x and _y) with diferent values. Then in the debug section, when the program terminated because of illegal parameters, I use "print_r($_POST);", and watch this: Array ( [task] => box_move [amount] => 1 [task2_x] => 14 [task2_y] => 10 )Array ( [task] => box_move [amount] => 1 [task2_x] => 8 [task2_y] => 6 ) Array ( [task] => box_move [amount] => 1 [task2_x] => 10 [task2_y] => 8 ) Each line I've got, by clicking the browser's backward button, then the same button again! I've found some forum articles on the net, telling that others have the same problem even without the same button name (fx. 1 code used isset-type check). The most embrasing, that the same code always works fine with Firefox, but not with Explorer and Conquerror.I have an idea, that I should set something in PHP or in explorer, that modify the posting method, but idk how. Anybody have an idea, or same problem, or anything? Thanks for any help! Link to comment Share on other sites More sharing options...
MoZo1 Posted September 17, 2006 Author Share Posted September 17, 2006 Grr, I'll answer 10 noob question, if you help me, how to fix this! :)Ok, I can work without multiple buttons, but not the same, and now JS is not allowed as requirement. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 18, 2006 Share Posted September 18, 2006 This is how <input type="image"> works. The X and Y values that you see are the (x,y) coordinates on the image that you clicked. Try it and you'll see, if you try clicking in the very upper-left corner of the submit image, the X and Y should be near (0,0).If you want to send a separate value that just has the name "task2", then put a value attribute on the button.<input type="image" src="..." name="task2" value="submitted"> Link to comment Share on other sites More sharing options...
MoZo1 Posted September 19, 2006 Author Share Posted September 19, 2006 Wow, thanks anyway, I've learned something new, but the submit image still have name and value, and it's still not working. Or rather, it works under firefox, but not under IE. But now I assume, that if it's not trash data, then the IE just directly don't send that. Thanks anyway! Link to comment Share on other sites More sharing options...
MoZo1 Posted September 20, 2006 Author Share Posted September 20, 2006 Me stupid. I don't have the value, but I have the button's name with '_x'. Then isset-type check. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now