Hello, I want to take the input name from the form and compare it to a predifined constant. And if it matches, then go to that URL - if it does not match I would like to go to a failure.php page. I am just learning php any coding help for the handle_form.php would be greatly appreciated. As this is written I am getting nothing. And being sent to this URL
http://www.rediheat.com/Miva/handle_form.php?code=abc&Submit=Submit
--------------------------------------------------Form------------------------------------------------
<form action="handle_form.php" method="get" name="affiliate_code" id="affiliate_code">
<p><b>Enter Affiliate Code</b>
<input name="code" type="text" size="6" maxlength="6">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
----------------------------------------handle_form.php-------------------------------------------
<?php
define('CODE1', 'abc');
define('CODE2', 'xyz');
define('CODE3', '123');
if ($code == 'CODE1')
header ('Location: http://www.rediheat.com/abc.php');
if ($code == 'CODE2')
header ('Location: http://www.rediheat.com/xyz.php');
if ($code == 'CODE3')
header ('Location: http://www.rediheat.com/123.php');
?>