PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a form which deletes from the database whena password is entered. However when i "click" the button with my mouse, it works. However when I hit "ENTER" the form doesn't work and it just seems to refresh the page.
*snip*
<tr>
<td class="e;trow1"e; align="e;left"e; colspan="e;2"e;><form action="e;"e; method="e;POST"e; name="e;deleteab"e;>Are you sure you want to delete this? If so, enter your password below and hit the "e;Confirm Delete"e; button.<br><font color="e;#FF0000"e;><b>WARNING:</b> This action cannot be reversed!</font><br>Enter Your Password:<br><input type="e;password"e; name="e;g_del_password"e; size="e;50"e;><br><input type="e;submit"e; name="e;deleteab"e; value="e;Confirm Delete"e;></form></td>
</tr>
*snip*
... and heres some more code from the top of the page:
onion2k wrote:Hitting enter is NOT the same as clicking a submit button. If you're relying on $_POST['mysubmitbuttonname'] being set, you'll be disappointed.
Ohhh... so what do i use that will work with clicking AND enter'ing?
Your code looks like it relys on register_globals being on as well.. be careful with this as there are security concerns and compatibility issues you could hit if and when your host upgrades to a newer version of php.
should change $_REQUEST to $_POST or $_GET depending on your form action.
If you know its coming from a form (with action = POST) then use $_POST instead of $_REQUEST, and visa versa.