| | |
PHP Quote form
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I would suggest using Javascript to validate the form, and then once the form has been sent validate it again using php.
Javascript validation is easy, just google for "Javascript Form Validation" and pleanty of examples appear.
The reason you must validate again using Php is because user's can disable javascript, so you shouldn't rely on users browsers to validate the form. It makes it easier for users, but it shouldn't replace your normal validation.
http://www.w3schools.com/js/js_form_validation.asp
That's the example I learned off.
Javascript validation is easy, just google for "Javascript Form Validation" and pleanty of examples appear.
The reason you must validate again using Php is because user's can disable javascript, so you shouldn't rely on users browsers to validate the form. It makes it easier for users, but it shouldn't replace your normal validation.
http://www.w3schools.com/js/js_form_validation.asp
That's the example I learned off.
The problem with using JavaScript is that the user can disable Javascript.
You could try using the strlen function.
You could try using the strlen function.
If my post is useful please add to my reputation.
Thanks.
Ajtrichards Web Solutions | http://www.ajtrichards.co.uk
Retenovate | http://www.retenovate.com
Thanks.
Ajtrichards Web Solutions | http://www.ajtrichards.co.uk
Retenovate | http://www.retenovate.com
•
•
•
•
The problem with using JavaScript is that the user can disable Javascript.
You could try using the strlen function.
He wants the user to be informed on the same page without the page reloading, and you do that with javascript.
If the user hasn't got it enabled, then the php still validates the form.
![]() |
Similar Threads
- Instant Quote Form (JavaScript / DHTML / AJAX)
- php login form (PHP)
- php mail form - need to redirect to new page (PHP)
- dreamweaver, PHP and submit form query (PHP)
- instant calculcated quote form (PHP)
Other Threads in the PHP Forum
- Previous Thread: wget into php
- Next Thread: mysql_fetch_array random problem?
| Thread Tools | Search this Thread |
advanced ajax apache api array beginner binary broken cakephp checkbox class cms code cookies cron curl database date display dropdownlist dynamic echo email eregi error execution file files folder form forms function functions google href htaccess html if...loop image include includingmysecondfileinthechain insert integration ip java javascript joomla jquery key library limit link login mail menu mlm multiple mysql oop paypal pdf pdfdownload php phpvotingscript problem query radio random recursion regex remote screen script search server sessions smarty sms soap sorting source space sql startup stored syntax system table traffic tutorial update upload url validator variable video web xml youtube zend





