Android PHP SQL database Connection

insert.php

<?php
error_reporting(0);
include 'connection.php';

    $name  = $_POST['name'];
    $email  = $_POST['email'];
    $phone1=$_POST['phone1'];
    $phone1 = $_POST['phone2'];
    $events = $_POST['events'];
    $aadhaar = $_POST['aadhaar'];
    $college = $_POST['college'];
    $branch = $_POST['branch'];

$flag['code']=0;

  if($qry=mysqli_query($con,"INSERT INTO `users`(`name`, `email`,              `phone1`,     `phone2`, `events`, `aadhaar`, `college`, `branch`) VALUES ('$name', '$email', '$phone1','$phone2','$events','$aadhaar','$college','$branch')"))
 {
   $flag['code']=1;
   echo "Data Inserted";
 }

   echo json_encode($flag);
   mysql_close($con);  
  ?>

connection.php

<?php
 $host='localhost';
     $uname='root';
     $pass='';
     $db="chroma2018";

     $con=mysqli_connect($host,$uname,$pass) or die("connection fail");
     mysqli_select_db($con,$db) or die("db selection fail");
     ?>

The insert.php script always returns Data Inserted , either the data is empty or filled . Whenever the script is loaded a blank data is automatically inserted and returns Data Inserted .