define('HOST','localhost');
define('USER','id3000922_siddhi');
define('PASS','siddhi123');
define('DB','id3000922_123 ');
$con = mysqli_connect(HOST,USER,PASS,DB) or die('Unable to Connect');
$username = $_GET['username'];
$password = $_GET['password'];
$email = $_GET['email'];
if($username == '' || $password == '' || $email == '')
{
echo 'please fill all values';
}
else{
$sql = "SELECT * FROM signup WHERE username='$username' OR email='$email'";
$check = mysqli_fetch_array(mysqli_query($con,$sql));
if(isset($check)){
echo 'username or email already exist';
}else{
$sql = "INSERT INTO signup (username,password,email) VALUES('$username','$password','$email')";
if(mysqli_query($con,$sql)){
echo 'successfully registered';
}
else{
echo 'oops! Please try again!';
}
}
mysqli_close($con);
}
在上面的代码中显示:
注意:未定义的变量:第8行的/storage/ssd4/922/3000922/public_html/User_registration/Register.php中的用户名
注意:第10行的/storage/ssd4/922/3000922/public_html/User_registration/Register.php中的未定义索引:密码
注意:未定义的索引:第12行的/storage/ssd4/922/3000922/public_html/User_registration/Register.php中的电子邮件 请填写所有值