Hello:
I've tried a number of ways to get these buttons to work. I highlighted the button that is giving me trouble in the code below. When clicking Page 1, it wants to go to Page 3 not Page 1. Also, when I run the script; I receive the following:
Notice: Undefined index: page in C:\Inetpub\fullfocus\AngelHouse\app_admission_pg2.php on line 7
Notice: Undefined index: page in C:\Inetpub\fullfocus\AngelHouse\app_admission_pg2.php on line 10
These messages are referring to the lines of code in my PHP script which I have below.
When you take the mouse and hover over each button, both buttons show the following URL: app_admission_pg3.php. The page 1 button when hovered should show app_admission.php. The page 3 button when hovered should show app_admission_pg3.php.
I included my code here, maybe someone can see something that I'm missing.
<form action="app_admission_pg3.php" method="post">
//form fields - too many to include
[COLOR="Red"]<input type="submit" name="page" value="<< Page 1" />[/COLOR]
<input type="submit" name="page" value="Page 3 >>" />
</form>
=========
This is the PHP code I'm using to tell which button to go where. At least that's what I was hoping for it to do....🙂
if ($_POST['page'] == "<< Page 1") {
$gotopage = "Location:app_admission.php";
}
else if ($_POST['page'] == "Page 3 >>") {
$gotopage = "Location:app_admission_pg3.php";
}
header('$gotopage');
Thanks for the help.