session problem
Moderator: General Moderators
session problem
hi there
just like to know how many sessions can i use in a single page??in my page, i have 3 session keys, but when i added the 4th, it didn't work....pls help
thanks
pleigh
just like to know how many sessions can i use in a single page??in my page, i have 3 session keys, but when i added the 4th, it didn't work....pls help
thanks
pleigh
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
here is wat i did last time, before the problem occur, i have these fields in the users table respectively; userID, firstname, lastname, username, password and email. i used userID, firstname and lastname as a session key. it was working out fine, i was able to call the session keys in my script. then i altered the table, adding another field in the table after the lastname, naming it "company", and i populated the field, i also made it as a session key so i can call the company name in the page and adding the code:
my code before was:
then called my new session key (company) to the handling page. unfortunately, it returned null. i wasn't able to call to my page the company name. the other sessions were fine but the company.
thanks
pleigh
Code: Select all
$_SESSIONї'company'] = $rowї3];Code: Select all
$_SESSIONї'lastname'] = $rowї2];
$_SESSIONї'firstname'] = $rowї1];
$_SESSIONї'userID'] = $rowї0];thanks
pleigh
this is my code in calling the firstname and lastname session keys:
then in another table in my html, i did the same for the company:
the first code above works fine except for the company session when calling it in the page.
Code: Select all
<? echo $_SESSIONї'firstname']." ".$_SESSIONї'lastname']; ?>Code: Select all
<? echo $_SESSIONї'company']; ?>