Hello everyone,
I am having issues with my logout redirect. Was working fine and stopped working all of a sudden. The errors I am getting are:
Warning: mysql_close() expects parameter 1 to be resource, boolean given in /home/www30mdg/public_html/admin/logout.php on line 11
Warning: Cannot modify header information - headers already sent by (output started at /home/www30mdg/public_html/admin/logout.php:11) in /home/www30mdg/public_html/admin/logout.php on line 13
My code for logout.php is:
<?php require_once $_SERVER["DOCUMENT_ROOT"].'/admin/logging/logInit.php'; $log->mylog('access','Logout',''); session_start (); @include ("xp/config.php"); $_SESSION = array (); // Empty the session session_destroy (); // Destroy the session mysql_close ($link); // Close the database connection for security reasons header ("Location: /admin/index.php"); // Redirect the user die; ?>Appreciate any feedback on this.
Thanks