Attachments
-
You do not have permission to view the full content of this post. Log in or register now.
If you want a transition of a web page by just editing a url or href ( to be specific). Siguro just use /blah/blah/ then /blah basta search mo lang yung may mga ganyan content mahirap explain. Paganahin mo lang yung logic. Sorry nalalabuan ako sa tanong. Do you mean "kahit logout kana " or "kapag logout kana"?
Depende siguro talaga sa pag kaka code ng dynamic web page n'ya. Use sessions, at dipende parin sa sequence ng destroy session. Add js din try mo pang disable ng ayaw mong mangyariibig niyang sabihin. kapag naglogout ka na logout na talaga. like sa fb. kasi merong iba kapag naglogout ka tapos nag backbutton ka maglologin ulit or babalik sa dating page.
kahit lagyang ng destroy session. alam ko ganito ang point ni ts.
Good idea rin pero parang binukod lang din yon dibagawa ka ng logout.php tas may nakalagay dun na isset tas session destroy
<?php
/*
* Secure.php
*/
// Start the session
session_start();
// Check if user is not logged in
if($_SESSION['logged_in'] != True) header("Location: login.php");
?>
<?php
/*
* Secure Page
* 2018
*/
// Iinclude mo na yung secure file na magccheck
include("secure.php");
?>
<!Doctype html>
<html>
<head>
<title>Sample Secure Page</title>
</head>
<body>
<h1>Secure Page</h1>
<p>Lodi Petmalu!</p>
</body>
</html>
<?php
/*
*Logout
*/
// Start the session (required)
session_start();
// Destroy Session
session_destory();
// Redirect after
header("Location: login.php");
?>