Php Help for redirecting users after entering right Coupon code

I am in need of Php help to redirect my users after they input the proper coupon code information. I creating a redirect on main page wear the text field and button is at redirecting to the php page that will do the action.

here is the code I used in my php page:

<?php $coupon_code = $_POST['Coupon Code Number placed here']; if ($coupon_code = $some_other_value) { $redirected_address = 'Location: my discount form page place here'; header ($redirected_address); exit(); } else { $redirected_address = 'Location: wrong form page placed here'; header ($redirected_address); exit(); } ?>

Not sure where I am going wrong here. Please help!

Thanks

Sponsor our Newsletter | Privacy Policy | Terms of Service