View Full Version : about cookies and sessions
satish
04-23-2005, 09:17 AM
i am new to php programming and now i have some doubt about the cookies and session variables.i have gone through the php manual,but unable to understand.the difference.
where i need these variables means, i am doing a small application regarding to the USER LOGIN DETAILS.here what is the respective coding when a user logins and gets logout.
and plz tell me which variables i have to use whether cookies or session
Tangerine Dream
04-23-2005, 12:03 PM
i am doing a small application regarding to the USER LOGIN DETAILS.here what is the respective coding when a user logins and gets logout.
and plz tell me which variables i have to use whether cookies or session
Hi, you should implement sessions and use session variables (session_start(), session_register(), etc.) in your PHP script for login, since sessions not only use cookies (note that you can force PHP sessions to use cookies only), but session IDs (PHPSESSID) and server-side "storage" to store values of session variables for every authenticated user. Cookies always stored on the client side and therefore can be tainted. Some useful tutorials and articles with sample PHP code: Session Handling with PHP 4 (http://www.zend.com/zend/tut/session.php), Session Authentication (http://www.zend.com/zend/spotlight/sessionauth7may.php), Session Management (http://www.phpbuilder.com/columns/index.php3?cat=6&subcat=36)
DigitalBliss
04-23-2005, 05:35 PM
Here is an indepth tutorial on sessions - http://www.phpfreaks.com/tutorials/41/0.php
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.