been playing around with the small project to log out but each time I'm trying to log out giving this error:
Warning: Division by zero in /home2/beastly/public_html/test/logout.php on line 4
Warning: Cannot modify header information - headers already sent by (output started at /home2/beastly/public_html/test/logout.php:4) in /home2/beastly/public_html/test/logout.php on line 4
Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in /home2/beastly/public_html/test/logout.php on line 8 You will be forwarded in back to login screen If not Click Here
<?php
//remove PHPSESSID from browser
if ( isset( $_COOKIE[session_name()] ) )
setcookie( session_name(), “â€, time()-3600, “/†);
//clear session from globals
$_SESSION = array();
//clear session from disk
session_destroy(); here