search

Home  >  Q&A  >  body text

Problems in the practical tutorial of PHP user login system

Original webpagehttp://www.php.cn/code/3984.html

There is a problem with the registration processing page in the fourth step. On the registration page, click Register Now Then go to the registration processing page and report an error

1.PNG

Code:

<?php
session_start();
//Registration processing interface regcheck.php
if(isset($_POST["hidden"]) && $_POST["hidden"] == "hidden")
{
$psw = md5(trim() $_POST["userpwd"]));
$psw_confirm = md5(trim($_POST["confirm"])); user == "" || $ psw == "" || $ psw_confirm == "")
{
echo "& lt; script & gt; alert ('Please confirm the information integrity!'); history.go (-1); & lt;/Script & GT; "; ##}
## Else if ($ code! = $ _Session ['ver_code']) {

Echo" & lt; alert ('The verification code is incorrect, please re-enter!'); History.go (-1); & lt;/script & gt; = $psw_confirm)
                                                                                                                                 conn)){
echo mysqli_error($conn); exit; mysqli_select_db($conn,"userdb"); //Select database
'); //Set character set
$sql = "select username from user where username = '$user'"; //SQL statement
                 $result = mysqli_query($conn,$sql);                                                                                                                                             result); //Statistics on the number of rows affected by the execution result exist '); history.go (-1);</script>"; 2long($_SERVER[' remote createip`) values('" . $user . "','" . $psw ."','".$time."','".$ip."')";
                                              { .href='login.php'; </script>";
}
                                                                                                                                                                                              since
                                           
}
}
Else
{
echo "& lt; script & gt; alert ('' passwords are inconsistent! '); Hestory.go (-1);/script & gt;";
}
}
}
Else
{
Echo "& LT; Script & GT; Alert ('Submitted unsuccessful!'); & Lt;/script & gt;"
}
?>

杨某人杨某人2576 days ago1085

reply all(1)I'll reply

  • phper_江上雨

    phper_江上雨2017-12-03 12:47:38

    This variable is not registered? I don’t see it in the code

    reply
    0
  • Cancelreply