skip to Main Content

 if($_SERVER['REQUEST_METHOD']=='POST'){

//this is my database

 include 'db.php'; 

 $con = mysqli_connect($servername,$username,$password,$dbname);

//inputs

 $email = $_POST['email'];
 $password = $_POST['password'];
 $phone = $_POST['phone'];

//checking query

 $Sql_Query = "select * from user_info where email = '$email' and password   = '$password' and phone = '$phone' ";


 $check = mysqli_fetch_array(mysqli_query($con,$Sql_Query));

 if(isset($check)){

 echo "Data Matched";
 }
 else{
 echo "Invalid combination of Username or Phone and Password ! Please Try     Again";
 }

 }else{
 echo "Check Again";
 }

//closing

mysqli_close($con);

what is the error, please help me out I’m stuck

2

Answers


  1. Please set the root path to include.

    <?php include('db.php'); ?> 
    

    Your issue may be resolved.

    Login or Signup to reply.
  2. If the issue is only on server , the following might help you:

    1. Check mysqli is enabled on server or not.
    2. Recheck username, password and dbname.
    3. Check if your db contains a table named user_info if so check column names also.
    4. Try debugging using echo 123;exit;, and find where the code breaks..
    5. Also check error log file.

    Hope this helps you.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search