Using end user entered promo code to redirect to promo product page

Greetings, this seems like such an easy thing to do, so i must be missing something...

I am developing a website that caters to schools athletic departments, each school will have its own category in an online shopping cart system (these categories will be hidden and only accessible thru direct URL)

I need to build a form that allows the end user to enter a "promo" code, the form would then reference a list, either xml or some other method. and with a match the end user would be redirected to the proper page....

so for example the user lands on and is presented with an option to enter their promo code.

they enter their code and the form checks with a list to see if there is a match, if there is a match the user is redirected to that promo code's specific category URL

The category ID and promo codes are not the same.... for example our categories have numbers assigned to them, but the promo codes will be words...

so to sum it up, when a user enters a promo code of "wolverines" they would be taken to the wolverines category page of

Thank you in advance for any advice!

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If you have some sort of database, you could easily have two columns, one the promo code word, and the other, the category ID.  

Are you using anything like PHP or ASP?  It would be very simple using something like PHP to check the database for the promo code.  If it exists, then it would redirect the page using either a meta refresh or javascript, to the correct page using the category ID from the corresponding column.

Advantage-GroupAuthor Commented:
The cart solution is asp based and i do want to incorporate the form into some of the carts pages as well as an HTML landing page. I was hoping to be able to do this with xml as it would be much easier for the store admin to update a simple xml doc with new codes and URLs
That shouldn't be a problem.  I don't know ASP myself, but I know it can read and write files.  I know from my experience in VB.NET that .NET has built in classes for reading and writing XML files (XML.XMLreader should be very useful).  Then it's just a matter of having a node called "Promo" with two child nodes "Code" and "CatID".  For example:


It should be super easy to parse.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Advantage-GroupAuthor Commented:
Thanks for the info Ray!

I can incorporate html into the carts articles but since i also want to make a static html landing page how can i access the data in a straight HTML file?

I don't think you can do it with straight HTML.  HTML is, like you said, static.  It doesn't do any reading/writing etc.  However, ASP feeds the browser straight HTML.  It just does it's thing before hand.

I may be misunderstanding what you mean.

Advantage-GroupAuthor Commented:
You got the right idea ray, guess i was looking for there to be a way via a javascript or something.
Guy Hengel [angelIII / a3]Billing EngineerCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.