![]() |
Need Help !! PLZ
hey erm im a kinda newbie to php have been using it for about 6 months and have ended up with a problem . I have got a site which i use for school but as the school is hooked up on a domain sometimes the different users cookies info displays and messes up . The script i am using is below if any person could help me or make me a login script which uses sessions instead of cookies and i am also able to extract username from sessions to help me fetch data from database
PHP Code:
PHP Code:
thanks in advance |
there will be a few changes u need to do to achieve this
first you gotta take away all references to $_COOKIE and replace them with $_SESSION, then change... PHP Code:
PHP Code:
you will need to change all of these throughout the whole site for it to work correctly. also i have found that session garbage collection or webservers can be done quite quickly some times, i wud recommend that you create a manual location to store sessions (outside of the root if possible), you do this like so... PHP Code:
|
Are you talking about a login script that logs the person out when they close the browser?
|
this is not working for me as the code i need is for me to use the session information to display user info
e.g. PHP Code:
For the moment i am using cookies so my $username bit is this PHP Code:
PHP Code:
|
to access the elements of the session u need to access them like this...
PHP Code:
|
k but would i have to lyk have a session start at the beginnin if i did how wud i go about doin that also hw wud i go about puttin bbcode in my pages
e.g if sum1 ryts sumfin in a text box which gets updated into their data hw wud i display it on their profile page e.g textbox [img]url[/img] to be displayed on profile as image |
if you are wanting to do BB code i suggest downloading a BBcode converter
this is one i found on google but there are loads out there... http://www.iceteks.com/articles.php/javascript2/3 |
k wot about my other problem
|
| All times are GMT +1. The time now is 07:53 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.