err... i guess you mean javascript, right? i would recommend to validate the form in PHP. otherwise you would have to do the validation twice (once on the client-side with JS and then again on the server-side with PHP because you can never be sure that the data the client sends are really valid. someone could simply turn off JS in his browser e.g.).