Re: [PHP] Form validation issue

2009-12-24 Thread kranthi
The javascript function formValidator() must return false if any errors are formed. The PHP only runs if the fields are set by testing using ‘isset”. You should definitely have a better validation than that. Remember that all users dont have javascript enabled. Moreover it is very easy to modify

Re: [PHP] Form validation issue

2009-12-24 Thread Allen McCabe
Tedd, If you are using a post method using $_SERVER['PHP_SELF'], then values are present in the POST array, hence, you would write your html with interspersed php like so: input type=text name=username value=?php if (isset($_POST['username'])) echo $_POST['username'] ? id=username / I sometimes

Re: [PHP] Form validation issue

2009-12-24 Thread tedd
At 2:22 AM -0800 12/24/09, Allen McCabe wrote: Tedd, If you are using a post method using $_SERVER['PHP_SELF'], then values are present in the POST array, hence, you would write your html with interspersed php like so: input type=text name=username value=?php if (isset($_POST['username']))

Re: [PHP] Form validation issue

2009-12-24 Thread tedd
At 3:10 PM +0530 12/24/09, kranthi wrote: The javascript function formValidator() must return false if any errors are formed. The PHP only runs if the fields are set by testing using 'isset. You should definitely have a better validation than that. Remember that all users dont have javascript

Re: [PHP] Form validation issue

2009-12-21 Thread Phpster
Does the js function return false on the errors to block the submission? Bastien Sent from my iPod On Dec 20, 2009, at 9:43 PM, Ernie Kemp ernie.k...@sympatico.ca wrote: Good Day, I need help in in validating a form. The for is valdated be a javascript

Re: [PHP] Form validation issue

2009-12-21 Thread tedd
At 9:43 PM -0500 12/20/09, Ernie Kemp wrote: Good Day, I need help in in validating a form. The for is valdated be a javascript frist then if all the fields are filled in its valaded be PHP. The Form starts with: form

[PHP] Form validation issue

2009-12-20 Thread Ernie Kemp
Good Day, I need help in in validating a form. The for is valdated be a javascript frist then if all the fields are filled in its valaded be PHP. The Form starts with: form name=myForm action=?php echo

Re: [PHP] Form validation issue

2009-12-20 Thread Midhun Girish
then the page gets reloaded and clears all the javascript error messages and does the PHP validation. That is because the form is getting submitted... make sure you js code prevents form submit if errors are found Midhun Girish On Mon, Dec 21, 2009 at 8:13 AM, Ernie Kemp