More multiple submit buttons

November 17th, 2005

Following on from Khalid's previous post on multiple submit buttons, its also worth nothing that you can have multiple submit buttons with the same name attribute, e.g:

<input type="submit" name="action" value="Edit" id="actionEdit" />
<input type="submit" name="action" value="Delete" id="actionDelete" />

So, once the form's been submitted, in PHP the $_POST['action'] var will be set to either Edit or Delete.


 Add to del.icio.us    Digg this    Technorati

Related Posts:

Entry Filed under: Other

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

November 2005
M T W T F S S
    Dec »
 123456
78910111213
14151617181920
21222324252627
282930  

Most Recent Posts