php中的错误请停止它

时间:2014-12-13 15:19:37

标签: phpmyadmin

if(isset($_POST['submit'])) {

$user_name = $_POST['name'];
$user_email = $_POST['email'];
$user_password = $_POST['password'];

if($user_name=='') {
echo "<stript>alert('Please enter your name!')</script>";
exit();
}

if($user_email=='') {
    echo "<script>alert('Please enter your email')</script>";
    exit(); 
}

if($user_password=='') {
    echo "<script>alert('Please enter your password')</script>";
    exit();
}

它无法帮助我!!! 我找不到什么是遗漏或我错了什么

2 个答案:

答案 0 :(得分:0)

我认为“stript”不存在。 这就是为什么第二个警报回声。并使用if(!empty($ _ POST ['name'])更好。

答案 1 :(得分:0)

你有错字/拼写错误,脚本

替换

 echo "<stript>alert('Please enter your name!')</script>";

echo "<script>alert('Please enter your name!')</script>";