trust me the session is destroyed but i cant get it to delete from dbase table for online code yet. will get back to that later other then that i got my forums working in beta mode users can add topics now but haven trouble with topic reply submiting the catid number and topic id if interested in my new script its http://phreakyfonez.net
very beta version right now but mine :p
my web site
Collapse
X
-
session_start(); make first line of code.
but im also curious to know how your executing the code. i see you making the
query but not executing it.
mysql_query("DELETE FROM `online` WHERE `who`='".$uid."' LIMIT 1");
also not seeing session being destroyed later.
session_destroy();
Leave a comment:
-
also after a second look .... as far as im aware session_start(); has to be the first line of code have u tried moving it so that it is above the included files.
Leave a comment:
-
just checking since all the code isnt there but u arent deleting the session content be4 trying to run the query are you.. if you are then the query would be running but it wouldnt contain any data.
Leave a comment:
-
tried that lol remember the session is stored in the browserOriginally posted by morency View Postmysql_query($sql);
Leave a comment:
-
my web site
writing a new web site in php from scratch got the login to work and logout .
ive updated my script to insert the hidden session into the dabase no probs.
whats happening is even though when logout is clicked the session is terminated. but wont delete the record from the database
heres my code
<?php
include_once("inc/database.php");
include_once("inc/func.php");
session_name('website');
session_start();
$uid=$_SESSION['userid'];
$_SESSION=array();
$r=session_id();
$sql = "DELETE FROM online WHERE who='".$uid."'";
die(header("Location: /loggedout.php"));
?>
Leave a comment: