Re: Server VS Client script validation

From: Date: Mon, 29 Jan 2001 23:25:53 +0000
Subject: Re: Server VS Client script validation
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-37180@lists.php.net to get a copy of this message
At 11:27 AM +0000 1/29/01, kaab kaoutar wrote:
Hi! What's best ? using client script while validating form inputs(javasript or vbscript) or using php for validating! with the first way, i can trigger alert ! however with the second one, i have to show up a whole page for just saying that there are errors, go back to the form ! any ideas ? thanks
Best way is to do it both ways: JavaScript to make a more user-friendly page, and server-side validation in case JavaScript is disabled AND to catch programs that simulate posts by writing directly to a socket. It's really easy to do that - via telnet to port 80, for example, or via PHP (see the posttohost function at one of the code libraries - see px.sklar.com, or phpbuilder.com, or on of the other resources). - steve -- +--- "They've got a cherry pie there, that'll kill ya" ------------------+ | Steve Edberg University of California, Davis | | sbedberg@ucdavis.edu Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +-------------------------------------- FBI Special Agent Dale Cooper ---+

« previous php.general (#37180) next »