tags:

views:

32

answers:

1

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 Session 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();
?>
+1  A: 

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

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

thephpdeveloper
So I will probably just wait for about 30 min?
Newb
if not you can just remove it. It doesn't do any harm to the system.
thephpdeveloper
Can't use this?session_destroy();
Newb
How, do you remove it, apparently my 'lil' web developer add-on is not reallyClearing any session cookies, for whatever reasons.
Newb
Never-mind, I can delete the cookie and session, I think the problem might be my require section of code, sessions are pretty nifty.
Newb