This question is similar to this one
However, my insert does not involve a form but a direct mysql query that looks like this
$query2 = "insert into table(author,title,abstract) values(:author,:title,:abstract) ";
$stm=$con->prepare($query2);
$stm->bindValue(':author', $author, PDO::PARAM_STR);
$stm->bindValue(':title', $title, PDO::PARAM_STR);
$stm->bindValue(':abstract', $abstract, PDO::PARAM_STR);
$stm->execute();
echo "$author   $title   $abstract <br>"
In this scenario, 'id' is an auto increment. How can i get $id value when the insertion was not made via a form input?