Web Hosting Talk







View Full Version : Help with a script !


tazd9t9
02-03-2002, 06:37 PM
Hi, can anoyone out there help me with a simple script, the order form on my website has no field validation, i just want to make sure certain fields have been filled in. I did it exactly the way i had done it using java script on my old site but for some reason it is being tempramental and will not work, as a result i am getting lots of blank emails from sad people who think it is fun to submit a blank order form on my site.

21inchguns
02-03-2002, 06:51 PM
why dont you just use php to do the validation, after the user submits the form, then dont process it until it passes....

priyadi
02-04-2002, 03:28 AM
I agree with previous poster, you should not rely on Javascript on form validation. Javascript can be bypasses easily. If you want Javascript validation, it is better to have server side validation as a second attempt that can't be bypassed too easily.

Lawrence
02-04-2002, 04:28 AM
If all you're concerned about is blank forms, then JavaScript is fine. The problem is fairly trivial, and the people who do it are not likely to want to try too hard just to send you a blank form! If you're not familiar with PHP or Perl to do a server side validation, it would be overkill to try.

There might be a basic form validation script that can help at http://javascript.internet.com.