开发者

php renaming session ID

By default the initial PHP session ID is:PHPSESSID However, when I change that to:YourVisit and I click on Cookies, and view Cookie information after submitting my form there are two Cookies: PHPSESSID and YourVisit, I thought there was only suppose to be one session ID?

This has been occurring even after hitting Clear Sess开发者_高级运维ion Cookies button and verifying that there are no sessions before submitting the form, just wondering why this is happening (two session ID's), I only need one, disclaimer the values are different and thank you for not flaming the newb.

session_name('YourVisit');
session_start();
<?php
// Take the user's email and store it in a session.
$_SESSION['email'] = $_POST['email'];
// Take the time that the user logged in and store that also in a session.
$_SESSION['loggedin'] = time();
?>


The old PHPSESSID was not removed. but it will be when expired.

If you visit after the change, PHPSESSID will not be set.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜