Hello, I always got this error while inserting data in mysql. I already exported the app and installed it in my phone since I can’t use Kodular Companion because it turning off quickly. I don’t know if the cause of the problem is from my source code or somewhere. I already searched this error here but still didn’t found something to help me solve the problem.
This is the source code:
<?php
$host = "localhost";//serverhost
$username = "username";
$password = "password";
$dbname = "dbname";// database name
date_default_timezone_set('Asia/Manila');
$Tk_SchDate = $_POST['Tk_SchDate'];
$Tk_Time = $_POST['Tk_Time'];
$Tk_PassName = $_POST['Tk_PassName'];
$Tk_Branch = $_POST['Tk_Branch'];
$Tk_Route = $_POST['Tk_Route'];
$Tk_Seat = $_POST['Tk_Seat'];
$Tk_DateAdd = date['Y-m-d'];
$Tk_Price = $_POST['Tk_Price'];
$Tk_Stat = "ACTIVE";
$Tk_CusID = $_POST['Tk_CusID'];
$Tk_CusName = $_POST['Tk_CusName'];
$conn = new mysqli($host,$username,$password,$dbname);
$sel = mysqli_query($conn, "SELECT * FROM qrcode WHERE Cus_ID='$Tk_CusID'");
$result = mysqli_num_rows($sel);
if($result>0)
{
$rows = $result->fetch_assoc();
$qr = $rows['QR_ID'];
$ins = mysqli_query($conn, "INSERT INTO ticket(Tick_Sch_Date, Tick_Sch_Time, Tick_Pass_Name, Tick_Branch, Tick_Route, Tick_Seat, Tick_DateAdd, Tick_Price, Tick_Stat,QR_ID, Cus_ID, Tick_Cus_Name) VALUES ('$Tk_SchDate','$Tk_Time','$Tk_PassName','$Tk_Branch','$Tk_Route','$Tk_Seat','$Tk_DateAdd','$Tk_Price','$Tk_Stat','$qr',$Tk_CusID','$Tk_CusName')");
if($ins)
{
echo "You reservation has now been sent";
}
}
This is my algorithm:

