Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] PHP validation better then java script ?

Started by Alamaraminu Jan 15, 2010 at 10:12 AM 2 replies 1.1k views
Original Post
Alamaraminu
Alamaraminu
Hi, I use PHP validation for my sites it is better then java script validation ? Thanks watch this movies [Edited by - Alamaraminu on February 14, 2010 7:13:27 AM]
Atrix256
Atrix256
Hi!

The PHP validation is better in the sense that it is more fool proof.

If someone's &#106avascript is turned off, or malfunctioning (due to malware, poorly made toolbars or other issues), it won't catch errors but the PHP code will.<br><br>Unfortunately, from a user interface point of view, &#106avascript is the better solution since it can tell the person what's wrong without needing a page refresh and them possibly losing the data they have filled into the other fields.<br><br>The best solution in my eyes has always been to do client side &#106avascript validation but also server side (PHP) validation since the client side can't be trusted.<br><br>It's double the work but it is the superior, most professional solution :P<br><br>Also, if doing double duty is too ugly for you, you can make some clever php which does server side checking and generates the client side &#106avascript validation code for you as well.
JoeCooper
JoeCooper
Seconded. Client side for usability needs, server side for security. Do not skimp on the latter.
ShotgunNinja
ShotgunNinja
Isn't this the Java forum?

Java and &#106avascript are two totally different things (with the exception of Rhino, possibly...)<br/><br/>Just letting you know, I'm not sure of the policy on this forum, but I've seen cases in other BBS where posting a &#106avascript-related question in a Java forum ticks some people off. Just a fair warning.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.