Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Peter Vertes
It makes perfect sense now.  Thanks for clearing it up for me Chris :) -Peter On Fri, 2004-01-09 at 15:29, Chris Shiflett wrote: --- Peter Vertes <[EMAIL PROTECTED]> wrote: > Just to play devil's advocate; why would you validate data on the > server if you have a _javascript_ that checked th

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Chris Shiflett
--- Peter Vertes <[EMAIL PROTECTED]> wrote: > Just to play devil's advocate; why would you validate data on the > server if you have a JavaScript that checked the user's input before > it gets submitted to the server? I mean the whole point of you having > that JavaScript is to make sure the the co

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Matt Matijevich
[snip] why would you validate data on the server if you have a JavaScript that checked the user's input before it gets submitted to the server ? I mean the whole point of you having that JavaScript is to make sure the the correct data gets entered so why bother checking it once again on the server

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Peter Vertes
On Fri, 2004-01-09 at 14:22, Chris Shiflett wrote: But, no matter what, always validate data on the server. Otherwise, it's like being a teacher and having your students grade their own work; it only works when everyone is honest (and I can guarantee you that won't be the case on a public Web

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Chris Shiflett
--- Matt Grimm <[EMAIL PROTECTED]> wrote: > Is there a distinct advantage to doing form validation / error checking > on the server side using PHP? Yes, security. Basically, I never think of it as client-side *versus* server-side. I think of it more like this: 1. Server-side data validation? YES

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Peter Vertes
On Fri, 2004-01-09 at 13:07, Matt Grimm wrote: Is there a distinct advantage to doing form validation / error checking on the server side using PHP? That's how I've always done it because I know PHP better than _javascript_, but wouldn't it make sense to validate as much of your form as possi

RE: [PHP] Form validation: client- or server-side?

2004-01-09 Thread craig
> Is there a distinct advantage to doing form validation / > error checking on > the server side using PHP? The actual code you use to validate remains hidden from a potential malicious user, while javascript code can be seen, so if there is a hole in your error checking, it can be found easier. T

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Ray Hunter
On Fri, 2004-01-09 at 11:07, Matt Grimm wrote: > Is there a distinct advantage to doing form validation / error checking on > the server side using PHP? That's how I've always done it because I know > PHP better than JavaScript, but wouldn't it make sense to validate as much > of your form as poss

RE: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Mike Brum
Yes, it's considered best practice to do as much client-side validation as you can as to save your server time and load. This doesn't mean you still shouldn't do full validation on the server-side, but the fewer times the form is posted to your site the better. You might want to recheck what Jav

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread David T-G
Matt -- ...and then Matt Grimm said... % % Is there a distinct advantage to doing form validation / error checking on % the server side using PHP? That's how I've always done it because I know 1) I hate JavaScript. 2) Don't trust anything coming from a client. You should be validating on the