| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| An American Soldier ![]() | User System -- Help what type of system do you use for maniulating your users. What i mean is, do you use sessions or cookies, or something else. I do not want to use sessions because it is ugly in the url, and cookies because alot of users dont use them. What do you recommend. I was thinking of using sessions and storing them in a database and having them expire every 1 hour.
__________________ Completely Free cPanel Hosting -- Deployed to Afghanistan -- "There is no such thing as rich over-night unless you owned Google stock in 2006" |
| |
| | #3 (permalink) |
| Senior Member | sessions are ugly in the url? oh you mean like GET variables... nah i just use a login and then once they login i set $_SESSION vars using session start. and for like "remember me", i use cookies. upon their first page visit, it checks to see if the session is started, if not, it checks for cookies, if cookies exist, the session is started and all the appropriate values are changes from cookies to session so it acts like its just saved session.
__________________ Hacksar.com - Your source for random computer tips and tricks! MySiteMemberships.com - Keep track of your site registration information! Like my post? Rep is appreciated! |
| |
| | #4 (permalink) |
| Senior Member | You don't seem to be understanding sessions properly in PHP. Depending on how PHP is setup it will use cookies anyway. If PHP is set up the default way then it will make a choice. If cookies are available it will use cookies, if they are not it will use a sess_id in the url's. If a cookie is used all it stores is the sess_id. The actual data itself is stored in a file on the server. This can be changed to store in a DB if you use session_set_save_handler
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft Last edited by Peter; 07-20-2008 at 06:19 AM. |
| |
| | #5 (permalink) |
| An American Soldier ![]() | anyone have anymorea advice
__________________ Completely Free cPanel Hosting -- Deployed to Afghanistan -- "There is no such thing as rich over-night unless you owned Google stock in 2006" |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |