This code is working fine.
$sql = "INSERT INTO EventTest (name,text,lat,lon,date,time,type,number,adress) VALUES ('$name','$text','$lat','$lon','$date','$time','$type','$number','$address')";
$sth = $con->prepare($sql);
$sth->execute();
I've added this code after the previous block.
$sql1 = "SELECT id FROM EventTest ORDER BY id DESC LIMIT 1";
$sth1 = $con->prepare($sql1);
$sth1->execute();
$sth1->bind_result($id)
while($sth1->fetch()) {
$data['YES'] = $id;
}
The table has all the fields. This code is not working.
I can't recieve the error from the server.