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 enabled. Moreover it is very easy
to modify the request variables.

However, if the server-side evaluation fails and the page is refreshed, then all the previous values are lost -- UNLESS -- you keep them in a cookie, database, or session. I suggest using a session.
This is true when the page is refreshed but I doubt that is the case
here. Since $_SERVER['PHP_SELF'] is being used I think value="<?php
echo $_POST[...] ?>" will be sufficient

I forgot to mention that $_POST does hold on to the values as well -- so, one could use that. However, you still have to repopulate the form and that was what I was getting at.

Cheers and Merry Christmas.

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to