Results 1 to 4 of 4
Thread: PHP session_destroy()
Hybrid View
-
18th September 2008 18:54 #1
PHP session_destroy()
index.php :
login.php , POST- validate.php, :PHP Code:<?php
session_start();
header("Cache-control: private");
$logout=$_GET[logout];
if (( $logout == 1)) {
session_destroy();
}
/*Check the session*/
if ($_SESSION["access"] == "granted")
include("adminpanel.php");
else
include("login.php");
?>
. adminpanel.php :PHP Code:if (mysql_fetch_row($result)) {
/* access granted */
session_start();
header("Cache-control: private");
$_SESSION["access"] = "granted";
header("Location: index.php");
} else
/* access denied => redirect back to login */
header("Location: index.php");
index.php logout=1, index.php . , , , .HTML Code:<a href="index.php?logout=1"></a>
header("Location: index.php"); session_destroy();, : Warning: Cannot modify header information - headers already sent
?
-
18th September 2008 19:47 #2
. :
session_unset();
$_SESSION = array();
. - .
. session_destroy :
header("Cache-control: private");
, . .
, , .
, . , .EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
18th September 2008 20:27 #3
Bombera session_unset(), cookie - ( - .. - 1 , ). , timestamp-a ( , ).
-
19th September 2008 10:28 #4




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in