| | Hi Do you validate your forms using PHP , javascript or both? I was just playing around with a tutorial for a very simple guestbook and the creator did use both javascript and php to validate. Thanks Patrick |
|
|
validate the forms? I did not understand, but I use PHP:
for <input name="name">: if(!$name){ print "You can't let the input "name" in blank."; exit; } for long forms: if(!$name || !$email || !$age){ print "You can't let any input in blank."; exit; } QUOTE(dark @ Jan 5 2005, 05:04 PM) Hi Do you validate your forms using PHP , javascript or both? I was just playing around with a tutorial for a very simple guestbook and the creator did use both javascript and php to validate. Thanks Patrick I'd prefer using both of them. the form data needn't to be send by using javascript
if php is available, it is the best method to evaluate forms. This is because some people have javascript disabled. If you use javascript, your form will not work in this case. Using php means the server does the work.
Plus, php is very simple. Just a bunch of IF statements and you are done. All my forms are done in php and I don't even have to use a seperate file. Just need an IF (!submit) {display form} ELSE {validate form}
Similar Topics
Keywords : validate forms
I made a simple flat file text editor, that can show you probably how simple it is to use forms with Hello everyone! I am in need of some code a for a signature generator I am making. I am using i have a web form on my site which can be filled in with a customers email, name and question or Here is a simple script to make a contact form with PHP. First off you make a simple contact form, Looking for validate, forms
|
|
![]() How Do You Validate Your Forms? |
| ADD REPLY / Got an Opinion! | a humble request :-) | RAPID SEARCH! | Free Hosting | [X] |
|
Express your Opinions, Thoughts or Contribute more info. to help others. Ask your Doubts & Queries to get answers, So that "Together We can help others!" |
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP. | 500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE |
|