问题描述
if(!empty($ _ POST ['firstname']))
{
if(!is_numeric($ _ POST ['firstname'])
{
if(strlen($ _ POST ['firstname']!< 4 || strlen($ _ POST ['firstname']!> 15)
{
$ f = mysqli_real_escape_string($ con,trim($ _POST ['firstname']));
}
else
{
$ errors ['firstname2'] ='最少4和最多15个字符';
}
}
其他
{
$ errors ['firstname1'] ='只输入字母';
}
}
其他
{
$ errors ['firstname1'] ='输入你的名字' ;
}
我的尝试:
i已尝试三种验证功能
emtpy
is_numeric
strlen
但它引发了Parse错误:语法错误,C中意外的'{'第15行\\ wamp\www; \\ new_waheed \htdocs\registration.php
if(!empty($_POST['firstname']))
{
if(!is_numeric($_POST['firstname'])
{
if(strlen($_POST['firstname'] ! < 4 || strlen($_POST['firstname']! > 15)
{
$f = mysqli_real_escape_string($con, trim( $_POST['firstname']));
}
else
{
$errors['firstname2']='Min 4 and Max 15 characters';
}
}
else
{
$errors['firstname1']='Enter only letters';
}
}
else
{
$errors['firstname1']='Enter your first name';
}
What I have tried:
i have tried three validation function
emtpy
is_numeric
strlen
but it raises Parse error: syntax error, unexpected '{' in C:\wamp\www\new_waheed\htdocs\registration.php on line 15
这篇关于意外错误{...请帮帮我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!