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
https://forums.phpfreaks.com/topic/18065-valadation-problam/
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
https://forums.phpfreaks.com/topic/18065-valadation-problam/#findComment-77445
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
https://forums.phpfreaks.com/topic/18065-valadation-problam/#findComment-77460
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.