$pword = $_POST['password']
$uname = htmlspecialchars($uname)
$pword = htmlspecialchars($pword)
$uLength = strlen($uname)
$pLength = strlen($pword)
if ($uLength >= 10 &&$uLength <= 20) {
$errorMessage = ""
}
else {
$errorMessage = $errorMessage . "Username must be between 10 and 20 characters" . "<BR>"
}
if ($pLength >= 8 &&$pLength <= 16) {
$errorMessage = ""
}
else {
$errorMessage = $errorMessage . "Password must be between 8 and 16 characters" . "<BR>"
}
$user_name = "root"
$pass_word = ""
$database = "login"
$server = "127.0.0.1"
$db_handle = mysql_connect($server, $user_name, $pass_word)
$db_found = mysql_select_db($database, $db_handle)
if ($db_found) {
}
$SQL = "SELECT * FROM login WHERE L1 = $uname"
$result = mysql_query($SQL)
$num_rows = mysql_num_rows($result)
if ($num_rows >0) {
$errorMessage = "Username already taken"
}
else {
}