PHP Code:
header( 'Location:' . $gift.php );
That line is wrong.
Either;
PHP Code:
header( 'Location: gift.php' );
Or
PHP Code:
$file = 'gift.php' ;
header( 'Location:' . $file );
Assuming of course that gift.php is in the same folder as the rest of this stuff.
You would make life easier for yourself if, when you face a problem you create a mini version of it and test it all out instead of trying to get so many things working at the same time.
PHP Code:
<?php
// see whats going on
var_dump($_POST);
echo '<hr />' . PHP_EOL ;
if( $_POST['submit'] == "Cancel" )
echo 'REDIRECTING, bye!' ;
?>
<form action = "" method=POST>
<input type="submit" value="Cancel" />
</form>
Nobody wants to read through all your div tags to work out what is wrong with a form element, or just your typo on header(Location).
Can you wrap code in PHP tags too? [ php ] code [ /php ] (remove spaces when you do it)
Divide and conquer.
HTH
Bookmarks