my web site

Started on the old forum in December 2014 · view the original in the archive · old links redirect here

#php

21 replies · 462 views · started 11 years ago · 1 min read

7 participants
ozziemale31 Lead · 861 posts #1

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")); ?>

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

morency Senior · 488 posts #2

mysql_query($sql);😑

Unamos los corazones,hoy todos somos multicolores!

Ghost Senior · 366 posts #6

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();

<?php include ('Ghost'); if ($Post == true) { echo ' ![](http://destrukt.dk/ico/phpdeveloper.jpg) alt='coding-talk.com!!' />'; echo 'Sharing Is Caring!'; } else { echo ' ![](http://img98.imageshack.us/img98/6476/av3ro4.jpg) alt='the username GHOST has been comprimised!' />'; echo 'OMG SOMEBODY HELP ME!!'; } ?>
ozziemale31 Lead · 861 posts #7

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 😛

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

ozziemale31 Lead · 861 posts #13

strange it works for me last night i signed up the id tester and got the email no probs with activation code. anyway i just got forums working today with user input fully working now to add admin options for posts and comments 🙂

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

subzero Super moderator Fellow · 3,954 posts #14

Time step session if wont to logout set session time 00-00 ........ i do time setup time 03-40 / 3 hours

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

ozziemale31 Lead · 861 posts #15

subzero wrote: Time step session if wont to logout set session time 00-00 ........ i do time setup time 03-40 / 3 hours

ill get there in the end sub 😛 just got bbcode working yesterday and some admin tools

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

arnage Lead · 811 posts #16

Cool. 🙂

Btw, something like...

mysql_query('DELETE FROM `online` WHERE `time` > ' . (time() - 600) . '');
<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
kevk3v Senior · 332 posts #18

arnage wrote: Cool. 🙂

Btw, something like...

mysql_query('DELETE FROM `online` WHERE `time` > ' . (time() - 600) );

...........

Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

arnage Lead · 811 posts #19

Don't do that, write complete syntax. 🍬

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close