If my PHP page contains:
<input type="submit" name="add1" value="Add Item">
<input type="submit" name="chgprice" value="Change Price">
<input type="submit" name="delete" value="Delete Item">
<input type="submit" name="main" value="Main">
as well as:
<?PHP
if($_POST['main'] == "Main"){
header('Location: http://hidden.edu/~test/457/1/index.php');
}elseif($_POST['dspphp'] == "Display Source" && $_POST['srcpw'] == "srcpass"){
$_SESSION['srcsite'] = "store.php";
header('Location: http://hidden.edu/~test/457/1/source.php');
}elseif($_POST['add1'] == "Add Item"){
header('Location: http://hidden.edu/~test/457/1/additem.php');
}elseif($_POST['chgprice'] = "Change Price"){
header('Location: http://hidden.edu/~test/457/1/changeprice.php');
}
?>
It autoforwards to changeprice.php. I just don't understand why it autoforwards there, and doesn't to the others. I have tried moving it around in the page but nothing seems to help. I can open the page directly, and it works fine. If I change changeprice.php to, say, index.php it autoforwards there instead. Any ideas?
Thanks for the input.