Jump to content

RoseG

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

RoseG's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. If I put the coupon code number there as well it still takes users to the page they should be at when they get the code wrong. it takes them there whether the code they enter is correct or not.
  2. Thanks Spiderwell, but when I add two ='s it only takes me to the last redirected page no matter what the user enters, I will like it to go to one page if they enter the correct coupon code or the other if entered wrong. Thanks!
  3. I am trying to redirect users depending on their coupon code input I am using the following script in the form created in dreamweaver: <form action="CodeUserredirect.php" method="post" enctype="multipart/form-data" name="" id=""> <input type="hidden" name="redirect" value="CodeUserredirect.php" /> <p class="style4">Redeem your Gift Certificate Savings for Special Orders here:</p> <p><span class="style78">Enter Coupon code</span> <input name="CouponCode" type="text" id="CouponCode" size="9"> <input type="submit" name="CheckCode" id="CheckCode" value="Check Code"> <br/> <br/> </p> </form> and I am using the following code in my php file: <?php $coupon_code = $_POST['couponcodenumber']; if ($coupon_code = $some_other_value) { $redirected_address = 'Location: specialordersDiscountForm.php'; header ($redirected_address); exit(); } else { $redirected_address = 'Location: specialorderwrongcode.php'; header ($redirected_address); exit(); } ?> Not sure where the issue is in these coding but it is not working to redirect users depending on their coupon input as intended. Can anyone supply me with a working code or explain what the issue is? thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.