Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

Simple HTML form for coupon codes?



4:32 pm on Sep 28, 2011 (gmt 0)

I'm trying to set up a VERY simple form box for a single coupon code.

Is it possible to send a user to a different page when they enter a specific code?

Nothing fancy, as there will be only one code that works.

For example, customer enters "XYZ" in the box, hit's submit, and get's sent to a discounted version of the product.

If they enter the wrong code, they get redirected to a different page.

Is this possible in HTML only?


5:11 pm on Sep 28, 2011 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Welcome to the forums, SMedia.

No, that's not something you can do with HTML alone. It's going to take scripting of some flavor or other. The script will run either server-side (most likely) or possibly client-side (like javascript) if the number of possibilities are minimal and not changing very frequently.


11:44 pm on Oct 3, 2011 (gmt 0)

10+ Year Member

If you run it client-side, I can get to your discounted version.


11:53 am on Oct 10, 2011 (gmt 0)

WebmasterWorld Senior Member piatkow is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

Of course it is possible to work around any client side coding, how javascript savvy are your visitors likely to be? Its a risk that you must consider if going for JS but most web users (and a significant number of amature webmasters) don't even understand that the source code exists.

Featured Threads

Hot Threads This Week

Hot Threads This Month