I have a form which will have to call two different php scripts based on the click of 2 submit buttons. Below is a sample of what I have so far
<?php
echo'<form name="form1" method="post">';
echo '<div>';
echo '<input type="submit" name="submit1" id="submit1" value="Create">';
echo '</div>'."\n";
echo '<div>';
echo '<input type="submit" name="submit1" id="submit1" value="Delete">';
echo '</div>'."\n";
if(isset($_POST["submit1"])) {
header("Location:script1.php");
}
else if(isset($_POST["submit1"])) {
header("Location:script2.php");
}
?>
This doesn't seem to be working. Help please