Email form validation- how to validate digits?
Posted: Thu Aug 23, 2007 1:32 pm
I'm new to PHP and I'm hoping to get a little advice.
I am creating an online form for my company's site, which is wholesale and not allowed to sell to the general public. In this form I need for our customer to put in their five digit customer numbers to successfully post a message to us.
I have a .csv database of active customer numbers and all I need for this form to do is identify if it is a valid customer number or not. ie. if someone types random digits into the field it won't work.
If a customer enters in a valid customer number it will go to a successfully sent/confirmation page, if not I need it to give an error message/warning on the form page itself.
It does not have to be more complicated than that or bring up customer info, etc. If the number isn't in the database, it simply needs to give the viewer a warning.
We do not have an ecommerce site just yet, otherwise I would be able to use its login abilities to shield us from unwanted requests, however in the meantime I just have to find something basic to work with our UNIX hosting.
What do you suggest? Thanks!
I am creating an online form for my company's site, which is wholesale and not allowed to sell to the general public. In this form I need for our customer to put in their five digit customer numbers to successfully post a message to us.
I have a .csv database of active customer numbers and all I need for this form to do is identify if it is a valid customer number or not. ie. if someone types random digits into the field it won't work.
If a customer enters in a valid customer number it will go to a successfully sent/confirmation page, if not I need it to give an error message/warning on the form page itself.
It does not have to be more complicated than that or bring up customer info, etc. If the number isn't in the database, it simply needs to give the viewer a warning.
We do not have an ecommerce site just yet, otherwise I would be able to use its login abilities to shield us from unwanted requests, however in the meantime I just have to find something basic to work with our UNIX hosting.
What do you suggest? Thanks!