Computer ForumsComputers  

Go Back   Computer Forums > Programmers Lounge > Programming Discussions

Reply
 
LinkBack Thread Tools Display Modes
Old 04-14-2007, 01:35 PM   #1 (permalink)
True Techie
 
Join Date: May 2006
Location: Chicago IL
Posts: 104
Send a message via AIM to thejeremy
Default Best way to do form validation?

This is a pretty simple question (I think):

Is it better to validate forms on a website using Javascript, PHP, or a combination of both? Would Javascript be better simply because it is a client-side language so things would be checked before they even reach the server?

Thanks.
__________________
CPU: AMD Athlon 64 X2 5200+ Windsor, 2.6 GHz
RAM: CORSAIR XMS2 2GB 240-Pin DDR2
VIDCARD: EVGA PCI-Express x16 GeForce 7900GS 256MB
MOBO: ASUS M2N-SLI Deluxe AM2
HDD: Seagate Barracuda 320GB 7200 RPM SATA

my blog: http://jspot.gotdns.com
thejeremy is offline   Reply With Quote
Old 04-14-2007, 10:15 PM   #2 (permalink)
Software Developer
 
Join Date: Mar 2006
Location: Columbus, OH
Posts: 494
Default Re: Best way to do form validation?

Validate on both sides.
jaeusm is offline   Reply With Quote
Old 04-15-2007, 02:07 AM   #3 (permalink)
Junior Techie
 
Join Date: Apr 2007
Posts: 79
Default Re: Best way to do form validation?

I say PHP simply because you can do more behind the scenes, and I'd prefer to live in a world with minimal javascript.
ZenOswyn is offline   Reply With Quote
Old 04-15-2007, 04:05 PM   #4 (permalink)
Master Techie
 
CrazeD's Avatar
 
Join Date: Feb 2006
Location: Maine
Posts: 2,933
Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: Best way to do form validation?

Quote:
Originally Posted by ZenOswyn View Post
I say PHP simply because you can do more behind the scenes, and I'd prefer to live in a world with minimal javascript.
Agreed.
__________________

Need website help? PM me!
CrazeD is offline   Reply With Quote
Old 04-17-2007, 10:51 PM   #5 (permalink)
Dope Tech
 
Join Date: Jan 2004
Posts: 3,660
Send a message via ICQ to office politics Send a message via AIM to office politics Send a message via Yahoo to office politics
Default Re: Best way to do form validation?

javascript can always be by passed. you can modify the script offline. YOU MUST VALIDATE SERVER-SIDE. on the internet the baddies will find you.
__________________
Tech IMO.com | ExtremeTech.com | ASP Free.com | SysOpt.com | Tech Support Guy.org
DB Forums.com | Cyber Tech Help.com | Lazy Forums.com | Warrior Nation.net

'If you don't stand for somethin you'll fall for anything' - Dr. Dre Been there, done that
office politics is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:00 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0