Jump to content

How do i make a 'log out' button with postgresql?


iNko

Recommended Posts

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'?

 

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.