<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width, initial-scale=1.0"><title>register</title></head><body><divclass="box"><formmethod="post"><h3>register</h3><inputtype="text"name="name"id=""placeholder=" enter your name"><inputtype="email"name="email"id=""placeholder=" enter your email"><inputtype="password"name="password"id=""placeholder=" enter your password"><inputtype="password"name="password_re"id=""placeholder=" enter your password again"><inputtype="submit"name="btn"value="register"id="btn"><p> Already Have An Account ? <ahref="login.php">login</a></p></form></div></body></html><!-- include style rel --><?php include 'conf.php';?><!-- include ended --><?php
if(isset($_POST['btn'])){
$name = mysqli_real_escape_sting($conn , $_POST['name']);
$email = mysqli_real_escape_sting($conn , $_POST['email']);
$password = mysqli_real_escape_sting($conn , $_POST['password']);
$pass = mysqli_real_escape_sting($conn , $_POST['password_re']);if($password == $pass){
$select = mysqli_query($conn ,"SELECT * FROM `u` WHERE email = '$email '")ordie("select failed");if(mysqli_num_rows($select)>0){
echo '<span class = `msg`>this user already exist</span>';}else{
$insert = mysqli_query($conn ,"INSERT INTO u (name, email ,password ) VALUES ('$name', '$email', '$password')")ordie("insert failed");}}else{
echo '<span class = `msg`>password not matched</span>';}}?>
output :
Fatal error: Uncaught Error: Call to undefined function mysqli_real_escape_sting() in C:\xampp\htdocs\server\ahmed\register.php:37 Stack trace: #0 {main} thrown inC:\xampp\htdocs\server\ahmed\register.phpon line37
السؤال
Moath Hijazi
output :
Fatal error: Uncaught Error: Call to undefined function mysqli_real_escape_sting() in C:\xampp\htdocs\server\ahmed\register.php:37 Stack trace: #0 {main} thrown inC:\xampp\htdocs\server\ahmed\register.phpon line37
2 أجوبة على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.