I have the following bit of code where I'm redirecting after an INSERT
to a MySQL database.
if ($connect->query($dragon_sql) === TRUE) {
echo "You've picked the dragon book!";
header('Location: index.php');
exit();
} else {
echo "Error: " . $sql . "<br>" . $connect->error;
}
$connect->close();
I've read on the manual page that exit
Terminates execution of the script. Shutdown functions and object destructors will always be executed even if exit is called.
So is close()
a shutdown function or object destructor? I can't really tell by reading the PHP manual page for it.