[PHP-NOTES] note 130441 added to function.session-destroy
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
I have provided a solution to avoid opening of pages directly through url without entering login page.. hope this serves the purpose.
session_start();
if (!isset($_POST['loginid']) && !isset($_SESSION['loginid']))
echo "<script language=javascript>{alert('Please Log in..'); window.open('index.php','_parent')}</script>";
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 2405:201:c049:7075:dcee:5e0d:5cb3:94da)
----
Manual Page -- https://php.net/manual/en/function.session-destroy.php
Edit -- https://main.php.net/note/edit/130441
Del: integrated -- https://main.php.net/note/delete/130441/integrated
Del: useless -- https://main.php.net/note/delete/130441/useless
Del: bad code -- https://main.php.net/note/delete/130441/bad+code
Del: spam -- https://main.php.net/note/delete/130441/spam
Del: non-english -- https://main.php.net/note/delete/130441/non-english
Del: in docs -- https://main.php.net/note/delete/130441/in+docs
Del: other reasons-- https://main.php.net/note/delete/130441
Reject -- https://main.php.net/note/reject/130441
Search -- https://main.php.net/manage/user-notes.php