the user is greeted with the following statement.
A freelancer with the name blah blah already exists in the willow crew database.
You can either edit the existing blah blah, add a new blah blah, or cancel this process.
and the form buttons
<Cancel> <Edit Existing> <Add New>
the form processes dupe.php
which is coded...... (nothing before or after this)
<?
if ($_POST['choice'] == "Cancel")
{header("Location: add_int.php");}
elseif ($_POST['choice'] == "Edit Existing")
{header("Location: edit.php");}
elseif ($_POST['choice'] == "Add New")
{
//MAIN CODE HERE TO INSERT DATA IN DB
//UNTIL EVENTUALLY
}
?>
the if statements all work correctly. In the instance of "Cancel" and "Edit" they relocate the user nicely.
However they also execute the "Add New" code and insert user into db.
I cannot see why this happens as the conditions of the "Add" statement have not been met.
Ideas??
Advance thanks.