Welcome to WebDesignForums.net!
You're currently viewing WDF as a guest. By registering for a free account, you'll be able to participate with other members in our friendly community. Being a member allows you to ask questions and get answers for those troublesome web development tasks!

In addition, as a member you'll be able to post your websites up for review. Using our unique website review system you can gain some amazing feedback from some of the best web developers around. This is a completely free service to all registered members.

Ready to register yet? Registration is 100% free. Click Here To Join Now!

Form Field Input Redirect Page

Discussion in 'Javascript, AJAX, and JSON' started by Wynn455, Jun 21, 2012.

  1. Offline

    Wynn455 Member

    Message Count:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Gender:
    Male
    Location:
    Ca
    Im trying to figure out how to have an Input Box with a Submit button that will redirect you to another Page.

    In other words, Im doing a Promotional Box.
    In the Box if you type Promo Code 123 it will take you to mypage.com/promo1.html
    Or if you type Promo Code 890 it will take you to mypage.com/promo2.html
    So On
    I know you would need a Database to list Codes and Redirects, But thats all. Could you please help?

    Thx


  2. Offline

    Webzarus Well-Known Member

    Message Count:
    3,003
    Likes Received:
    666
    Trophy Points:
    113
    Gender:
    Male
    Don't necessairly need a DB unless you're gonna be running a bunch of promos... And you just need something to manage it.

    With asp ... You'd just catch the data from the form they entered with the request.form("promo_code") or something similar , then a series of if then elseif statements to redirect them to the proper destination.

    I'm sure it can be done similarly with php, but quite honestly, I'm not that familiar with it...


  3. Offline

    Wynn455 Member

    Message Count:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Gender:
    Male
    Location:
    Ca
    Maybe like 15 Different Promos, Still doing research on the request.form


Share This Page