if ($username != '')
{
if($password != $password1)
{
echo 'Password does not match<br />';
}
else if ($username > 14)
{
echo 'username too long';
}
else if ($username < 5)
{
echo 'username too short';
}
else if($password < 5 && $password1 < 5)
{
echo 'Your password or username is too short, minimum of 5 characters<br />';
}
else{
我試了幾次,但它說我的用戶名太短,即使它有9個字符。在PHP中檢查文本框長度
使用strlen()... –