[FX.php List] One Button, two forms/scripts?
Jonathan Schwartz
jonathan at eschwartz.com
Thu Oct 6 19:13:06 MDT 2005
Hello.
I have an edit page (edit.php) where users fill in a form, click a
refresh button which loads edit_response.php to save the data,
leaving the user on the original edit page to continue editing. When
they want to leave, they click a separate button (continue), which
delivers them to a thank you page. No processing...just display of
data.
The problem....users who edit and click continue (skipping the step
which saves the data on edit_response, lose their data. I have tried
to use a warning note, asking users to click refresh button before
leaving...but that fails the ultimate test...the Melanie test.
Melanie is my wife. ;-)
To the question. How do I have the Continue button run the
edit_response script before heading to the Thank you exit screen. I
would still kep the Refresh button.
Here is the code for the two buttons:
<form method="post" action="edit_response.php">
<input type="hidden" name="recid" value="<?php echo $recid; ?>">
<input type="image" name="refresh" src="images/refresh.gif">
</form>
The Thank you/Exit button:
<form method="post" action="approve.php">
<input type="hidden" name="recid" value="<?php echo $recid; ?>" />
<input type="image" name="approve" border="0"
src="images/buttoncontinue.gif">
</form>
Thanks!
Jonathan
More information about the FX.php_List
mailing list