title: php mysqli insertion not working
body: <p>I am trying to insert data into mysql but not working,
  no errors are showing bellow is php script</p>
  
  <pre><code>    $mysqli = new mysqli('localhost','root','','realestate');
  
       if($mysqli-&gt;connect_error){
       printf("can not connect database %s\n",$mysqli-&gt;connect_error);
       exit();
       }  
  
   if (isset($_POST['submit'])){
  
       $a_name=$_POST['a_name'];
       $a_number=$_POST['a_number'];
       $email=$_POST['email'];
       $password=$_POST['password']; 
  
  
       $target_dir="uploads/";
       $target_file=$target_dir . basename($_FILES["a_image"]["name"]);    
       $temp_file=$_FILES["a_image"]["name"];
  
       move_uploaded_file($_FILES["a_image"]["tmp_name"], $target_file ); 
  
      $query="INSERT INTO agent (a_name,a_number,email,password,a_image) 
       VALUES ('$a_name',$a_number,'$email','$password','$temp_file')";
      $insert = $mysqli-&gt;query($query);
  </code></pre>