If a duplicate id error occurs i want to record it into the db. I am using this snippet below, how do i make room for it to insert the error information in the db?
Code:
if ( $postedid === $storedid ) {
require("error.php");
die("");
}else{
echo("");
}
You simply pass the MySQL Query into the
die();function.You would get the errors using
mysqli.errno.php and mysqli.error.php
DB QUERY –