Jump to content

Problem inserting data int

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Problem inserting data int

  1. <?php

    $fname=$_POST['fname'];
    $lname=$_POST['lname'];
    $email=$_POST['email'];
    $pass=$_POST['password'];
    $country=$_POST['country'];
    $mobile=$_POST['mobile'];
    $gender=$_POST['gender'];
    $con=mysqli_connect('localhost','root','','website');
    if($con)
    {
    echo " Connection is established";
    }
    $query="INSERT INTO user (`F_Name`, `L_Name`, `Email`, `Password`, `Country`, `Phone`, `Id`) VALUES ('$fname','$lname','$email','$pass','$country','$mobile')";

    $run=mysqli_query($con,$query);
    if($run == TRUE)
    {
    echo "Account Successfuly Created";
    }
    else
    {
    echo "Errorrrr!!!";
    }
    ?>

×
×
  • Create New...