I have a guestbook where I want the users to be able to delete their own posts. This is a part of my code:
session_cache_expire(30);
session_start();
$_SESSION[('unique_id')] = session_id();
$sessionen = $_SESSION[('unique_id')];
// Here is decided if the user is able to delete the post
if ($sessionen == $rad[sess_id]) {
print ("<a href=gastbok.php?remove=$rad[id]><img src=../Ikoner/delete.gif alt=Delete this post width=27 height=14 border=0 align=middle onclick=\"return raderaInlagg()\"></a>");
}
The thing is that I want the session to expire after 30 minutes (if the user forgets to close down the browser), but I can't get it to work. What am I doing wrong?