session Id

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pagegen
Forum Commoner
Posts: 32
Joined: Sat May 31, 2008 6:38 am

session Id

Post by pagegen »

Hey guys i am using

Code: Select all

session_start();
$Busername = session_id();
 
to make a session and then add it to a $Busername..

that works and when i do ECHO $Busername;

that works to but it wont let me add the session id to database

i get this error
Unknown column 's8judj32l4nnuv2hdogq9iddk4' in 'field list'

i want it to be varchar compatible so i can add it to database

can u guys plz help?

is is session ID always different?
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Re: session Id

Post by Oren »

Different users will have different session IDs, of course. Even the same user will have different session IDs from time to time.
Show us your code please.
pagegen
Forum Commoner
Posts: 32
Joined: Sat May 31, 2008 6:38 am

Re: session Id

Post by pagegen »

Oren wrote:Different users will have different session IDs, of course. Even the same user will have different session IDs from time to time.
Show us your code please.
i have added my code in the 1st post..its been edited a bit to

thanks

the same users session id wont cng unless they close the site right?
pagegen
Forum Commoner
Posts: 32
Joined: Sat May 31, 2008 6:38 am

Re: session Id

Post by pagegen »

hey can someone plz help
User avatar
starram
Forum Commoner
Posts: 58
Joined: Thu Apr 10, 2008 1:27 am
Location: India
Contact:

Re: session Id

Post by starram »

You have problem in the insert query you wrote.
please paste that here.
Post Reply