php cookies and session help

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
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: php cookies and session help

Post by Benjamin »

knight13 wrote:how do i use sessions or cookies to track a persons username and password
Once you "start a session" you can define persistent $_SESSION variables.

Please read:

http://us.php.net/manual/en/function.session-start.php
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: php cookies and session help

Post by John Cartwright »

You are limited to bumping your thread once per 24 hours. Continuing to do so will result in actions being taken. You've been warned.
zainmirza
Forum Newbie
Posts: 3
Joined: Wed Oct 27, 2010 8:11 am

Re: php cookies and session help

Post by zainmirza »

Hi guys,
Session and cookies in PHP basically preserving the data in web pages. This is technique which cross the data between all admin dynamic pages. For example capture the ID and password for admin facility the next page would be carry session variable as
<----A D M I N S I T E A R E A-------->
LOGIN ------------------------------------------------------------------------------------------------LOGIN
Page 1, Page 2, Page3,........
SESSION ---> pass value to Page 2, and same as next if page is visited stored authenticated information

here is function of session in PHP is
session_strat();
$_SESSION['id']=4;
$_SESSION['admin'];
Post Reply