I have a form that is asking for a code to be entered.
<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>
This is where I need help, I would like to define three constants
define('CODE1', 'http://www.mysite.com/customer_abc.php');
define('CODE2', 'http://www.mysite.com/customer_xyz.php');
define('CODE3', 'http://www.mysite.com/customer_123.php');
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