Jump to content

Recommended Posts

Hi ev1 - this is my first post!

 

Basically I'm relatively new to php, I know the basics and have made some pretty cool stuff with php already - but I am currently fascinated by executing and validating forms.

 

I'm very fluent in html, css and know enough javascript/jquery to get by and I also understand how mail forms are executed in their most basic sense, but thats not essentially what I'm getting at.  I know there are literally hundreds of techniques for doing this, but nobody ever seems to agree.

 

I'm looking for the best solution to combine client side and server side validation to validate and execute something like a log in form that is done in the most effective and efficient way.

 

So far I'm thinking that making the form submit its self and checking with javascript to see if the fields are valid before changing a 'return false', the on to the php code.

 

Any help much appreciated here - love to hear all of your methods... lots of code please -  links to tutorials or similar threads much appreciated!

 

Cheers

 

Blake

 

 

Javascript is fine for instant validation, but is not dependable.  What I mean by that is that Javascript can be turned off, so your main focus is on PHP validation of the incoming form data.

 

With that said, your thought to, "combine client side and server side" should not implemented.  They should remain two separate entities.

I thought it was common practice to use client side and server side validation.

 

So basically, if I see a nice error message that appears without a page refresh, that isn't necessarily javascript validation, just a client side effect to show the results of the php validation?

if I see a nice error message that appears without a page refresh, that isn't necessarily javascript validation, just a client side effect to show the results of the php validation?

 

In terms of a login page, it would be both (Ajax) client-side and server-side.

 

http://www.jformer.com is a nice little jQuery based lib that Ive been using a little lately which has been nice. There's not much documentation around but the examples are good enough.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.