Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Best way to do form validation?
Closed Thread
Old 04-14-2007, 01:35 PM   #1 (permalink)
 
True Techie

Join Date: May 2006

Location: Chicago IL

Posts: 104

thejeremy

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  
Old 04-14-2007, 10:15 PM   #2 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default Re: Best way to do form validation?

Validate on both sides.
jaeusm is offline  
Old 04-15-2007, 02:07 AM   #3 (permalink)
 
Junior Techie

Join Date: Apr 2007

Posts: 79

ZenOswyn is on a distinguished road

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  
Old 04-15-2007, 04:05 PM   #4 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,683

CrazeD will become famous soon enough

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  
Old 04-17-2007, 10:51 PM   #5 (permalink)
office politics's Avatar
 
It's all just 1s and 0s

Join Date: Jan 2004

Location: in the lab

Posts: 4,410

office politics will become famous soon enough

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.
office politics is offline  
 
Closed Thread

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