Jump to content

valadation problam


redarrow

Recommended Posts

i can not post the whole code as it's 1400 lines long sorry but the example is below cheers.

hi there all can you see why the valadation wont work please.

does not seem to valadate.
[code]
<?php

$name_lenth=strlen($name);
$password_lenth=strlen($password);

if(($name_lenth )||($password_lenth) > 15){

echo " sorry but name and password are only max 15 characters long ";

}
?>
[/code]
Link to comment
Share on other sites

cheers.

what i need to now now is when you get a user to fill in a form and use exit and give them a link to go back and try agin do you use sessions to keep there old settings or do you get them to fill it all in agin .

or do you keep the most inportant in a session.
Link to comment
Share on other sites

What i do is if i run into any errors i store them in a $error variable via .= and if there were any errors echo $error and then have the form have the values they just submitted in it by echo the post variables like value="<?=$_POST['name'];?>" That way it doesnt validate but they dont have to retype everything...
Link to comment
Share on other sites

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.