Search
Left Quote    If at first you don't succeed, redefine success.
- Anon.    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: user id in Complete Member System
  This user is online  Guest
  Subject: "user id in Complete Member System" Posted: @ 3:11 pm on Nov 28 2005   
Unregistered
Hi, I want to be able to store the user id in the session and use this for all the following db queries. Problem is that no matter what I do, I can't seem to get the user id out of the database and stored.

I have this in login:

$sid = test;

//set session variables
$_SESSION['logg ed_in'] = 1;
$_SESSION['sid' ] = $sid;

but I can't seem to get an id into $sid from $get_user

Am I looking in the wrong place?

Many thanks.

    Viewed: 4,330 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: user id in Complete Member Syst..." Posted: @ 6:37 pm on Nov 28 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

on this page of the article: Creating a Members System: Page 7

after verifying the user, you can set the session variable of the user id like this:


Code:


$_SESSION['use r_id'] = $q->id;





-bs0d | AllSyntax.com

    Viewed: 4,320 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank