Hello,

On 10/02/2003 12:14 AM, Brad Pauly wrote:
$_SESSION['form_errors'] = validateFormData($formdata);


redirect("to_the_previous_page.php");

You may want to study how this classic form validation and generation class works. It generates the necessary Javascript to validate on the client side and uses the class methods to validate on the server side.



It makes it simple to generate, validate and process a form in the same script, thus avoiding needless server access roundtrips that only slow down the sites for the users.


While there is overhead in making that round trip, I wanted to note a
few reasons that I prefer server side validation.

I suppose that you missed the point that the class provides you to do both client side and server side validation in cases that it is possible.



Also, hardware is very fast for what it costs (I know, don't solve a
problem by throwing money at it). Anyway, just some things to consider.

I don't think that hardware speed will make the Internet connections any faster. A lot of people still use dial-up connections and having to submit a form to let the server tell the user that something is wrong is a needless additional round trip that many times could be avoided and make your site more usable, ie, less annoying for the users.



--


Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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



Reply via email to