Hello -
I have a single form with two buttons, currently named
'Button1' and 'Button2'. Both buttons lead through the default
DW/php code to update database records (in MySQL), but I want the
page redirect after updating to be determined by which button was
pushed.
I am using $_GET['ButtonName'] to direct action based on
which button was used to submit the form. Unfortunately, I can't
seem to redirect the page where I want.
The code I am using is:
=======
if (isset($_GET['Button1'])) {
$updateGoTo = "edit_onepage.php";
} else {
$updateGoTo = "account.php";
}
========
If the user submits using Button1, I want them forwarded to
"edit_onepage.php". If he submits using Button2, I want him
forwarded to "account.php". Unfortunately, no matter how I fiddle
with this code, the form is always forwarding to "account.php",
regardless of which button is pushed.
Can anyone see what I am missing here? Thanks in advance for
your advice.