iNko Posted May 6, 2012 Share Posted May 6, 2012 Hey again, was making a registration form with php and postgresql and im stuck at making a 'log out' button, i need to make something simple like - press on a link, it redirects u to the index page and if u try to go 'back' it wouldn't let u.. I found something on google like this: <a href="test.php?logout=1">Log out</a> and on test.php: <?php if(isset($_GET['logout'])){ session_unset; session_destroy; } ?> Succesfully logged out, go back to index page: <a href="index.php">Home</a> but i didnt use any sessions at all.. is there something like 'session_destroy' with postgre? i mean smth like 'pg_desroy'? Quote Link to comment https://forums.phpfreaks.com/topic/262165-how-do-i-make-a-log-out-button-with-postgresql/ Share on other sites More sharing options...
Mahngiel Posted May 6, 2012 Share Posted May 6, 2012 I found something on google like this: <a href="test.php?logout=1">Log out</a> and on test.php: <?php if(isset($_GET['logout'])){ session_unset; session_destroy; } ?> but i didnt use any sessions at all.. is there something like 'session_destroy' with postgre? i mean smth like 'pg_desroy'? I don't know anything about postgre, but, you're not checking for the existence of a session, nor the proper value of a session being set, nor even the proper value of logout. Quote Link to comment https://forums.phpfreaks.com/topic/262165-how-do-i-make-a-log-out-button-with-postgresql/#findComment-1343524 Share on other sites More sharing options...
WatsonN Posted May 7, 2012 Share Posted May 7, 2012 How is the user logged in? Is it a cookie or something, show us your login code. Quote Link to comment https://forums.phpfreaks.com/topic/262165-how-do-i-make-a-log-out-button-with-postgresql/#findComment-1343717 Share on other sites More sharing options...
The Little Guy Posted May 7, 2012 Share Posted May 7, 2012 postgre has noting to do with login/logout. Quote Link to comment https://forums.phpfreaks.com/topic/262165-how-do-i-make-a-log-out-button-with-postgresql/#findComment-1343729 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.