0810
11-26-2002, 05:47 AM
Hi how are you? My script doesn't work because even though I put fname and lname less than 4, it goes to my database.
What I like to do is fname and lname have to be more than 4 characters and password alos has to me more thatn 4 characters. Password and confirme should be same.
I did like this but not working
could you help me out
Thanks
if($fname < 4 && $lname < 4){
print("You firstname and lastname should be more than 4 characters.<br>\n");
}
if($password < 4 && $password!=$confirm ){
print("Password and Confirm are not right,<br>go back to sign up again<br>\n");
print("<a href=\"sign.php\">Here sign up again please!</a>");
}
if($password==$confirm){
$query_insert = "insert into kk (fname,lname,mail,username,password ,confirm) values ('$fname','$lname','$mail','$username', '$password', '$confirm')";
$query_result_insert = mysql_query($query_insert, $con) or die (mysql_error($con));
print("<html><body background=\"image/kareha.gif\">");
print "Thank you for filling out my form.<br> <a href=\"Ja1test.php\">Click here</a> to go back to the homepage.<br>\n";
print("Now it is fall and soon coming winter<br>Time goes fast. ");
print("<center><img src=\"image/falltrees.gif\"></center>");
print("</body></html>");
mysql_close($con);
}
} else {
What I like to do is fname and lname have to be more than 4 characters and password alos has to me more thatn 4 characters. Password and confirme should be same.
I did like this but not working
could you help me out
Thanks
if($fname < 4 && $lname < 4){
print("You firstname and lastname should be more than 4 characters.<br>\n");
}
if($password < 4 && $password!=$confirm ){
print("Password and Confirm are not right,<br>go back to sign up again<br>\n");
print("<a href=\"sign.php\">Here sign up again please!</a>");
}
if($password==$confirm){
$query_insert = "insert into kk (fname,lname,mail,username,password ,confirm) values ('$fname','$lname','$mail','$username', '$password', '$confirm')";
$query_result_insert = mysql_query($query_insert, $con) or die (mysql_error($con));
print("<html><body background=\"image/kareha.gif\">");
print "Thank you for filling out my form.<br> <a href=\"Ja1test.php\">Click here</a> to go back to the homepage.<br>\n";
print("Now it is fall and soon coming winter<br>Time goes fast. ");
print("<center><img src=\"image/falltrees.gif\"></center>");
print("</body></html>");
mysql_close($con);
}
} else {