multiple submit buttons in one form
Posted on 2006-05-26
I would like to have a form that would have two submit buttons but I have no idea how to do that.
basically I have a form that a user fills out and i want them to have an option to "preview" their entry or "post" their entry.
so it would require two "actions" but I don't know if that's possible.
<form action="/post.php" method="post">
<input type="text" name="title" />
<input type="submit" value="preview" /> # i want this submit button to go to preview.php instead of post.php
<input type="submit" value="submit" /> # i want this submit button to go to post.php