following is the code for inserting the data into database code and output
<?
include ("init.php");
$bus_no=$_POST["bus_no"];
$pwd=$_POST["pwd"];
$lon=$_POST["lon"];
$lat=$_POST["lat"];
$sql="INSERT INTO `bus` (`bus_no`, `pwd`, `longitude`, `latitude`) VALUES ('23', '1', '34', '34')";
if(mysqli_query($con,$sql))
{
print ("<br><h3>one row inserted.....</h3>") ;
}
else
{
print ("error in insertion....".mysqli_error($con)) ;
}
?>
the init.php code is as follows and output
<?
$host="files.000webhost.com";
$user="id6648536_jeevan";
$password="*************";
$db="id6648536_bus_tracker";
$con=mysqli_connect($host,$user,$password,$db);
if(!$con)
{
die("error in connection".mysqli_error());
}
else
{
echo("<br><h3>connection success...</h3>") ;
}
can anyone plzz tell me why i am getting output in this way and my data is not getting inserted into database.
Thank you.