I have the php:
$con=mysqli_connect("","","","");
$sql="INSERT INTO xxx (xxxx, yyyy, zzzz)
VALUES
('$_POST[A]','$B','$C')";
$result = mysqli_query($con,"SELECT id FROM xxx ORDER BY id DESC");
$row = mysqli_fetch_array($result);
Will this $id
be the one before the inserted data or after?
$id = $row['id'];
mysqli_close($con);