Hi Folks
I have a few submit buttons on one page, so I'm trying to differenctiate between them, like GT have done with theirs <g>.
I have buttons like:
<input type="submit" name="action=edit_main&id=$ref->{id}" value="Edit">
<input type="submit" name="action=del_main&id=$ref->{id}" value="Delete">
etc.
However, when I hit submit on one of these buttons, the script doesn't recognise the sub-routine. I've tried GET and POST methods and it just doesn't want to recognise it.
The information it passes with a GET is obviously:
?action%3Dedit_main%26id%3D3%26=Edit
Which just comes up with an error that it can not find the sub routine.
However, if I actually type the URL into the browser, without the escape characters, like so:
?action=edit_main&id=3=Edit
It works fine. Which makes me wonder that my script doesn't like those escape characters.
Hmm. I'm missing something obvious here. Anyone have any ideas what is it?
Cheers
Wil
- wil
I have a few submit buttons on one page, so I'm trying to differenctiate between them, like GT have done with theirs <g>.
I have buttons like:
<input type="submit" name="action=edit_main&id=$ref->{id}" value="Edit">
<input type="submit" name="action=del_main&id=$ref->{id}" value="Delete">
etc.
However, when I hit submit on one of these buttons, the script doesn't recognise the sub-routine. I've tried GET and POST methods and it just doesn't want to recognise it.
The information it passes with a GET is obviously:
?action%3Dedit_main%26id%3D3%26=Edit
Which just comes up with an error that it can not find the sub routine.
However, if I actually type the URL into the browser, without the escape characters, like so:
?action=edit_main&id=3=Edit
It works fine. Which makes me wonder that my script doesn't like those escape characters.
Hmm. I'm missing something obvious here. Anyone have any ideas what is it?
Cheers
Wil
- wil