Multiple buttons single form

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!

Moderator: General Moderators

phpnewbieperson
Forum Newbie
Posts: 22
Joined: Wed Mar 26, 2008 8:25 am

Re: Multiple buttons single form

Post by phpnewbieperson »

pickle wrote:Why are you testing for $_POST['Action']? There's no variable named 'Action' in your form, and 'Action' isn't being POSTed.
Yep, there is

Code: Select all

<input type="Submit" name="Action" value="Update" /> <input type="Submit" name="Action" value="Delete" onclick="if (! confirm('Are you sure?')) { return false; }" />
but, anyways, I have had another programmer look at it, and it seems there was a slight error in the logic of the php programming - he simply modified the if else statement a little in terms of syntax, and it now works....

Thanks for all the input, it is appreciated.
Post Reply