Session Oddity

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
Saethyr
Forum Contributor
Posts: 182
Joined: Thu Sep 25, 2003 9:21 am
Location: Wichita, Kansas USA
Contact:

Session Oddity

Post by Saethyr »

Okay,

I am working on a project where I have to create a session variable called tech ID I do it in the following way

Code: Select all

<?php
session_start();

//This should never be the same
$_SESSION["TechID"] = date("Ymdhis");
$Tech = $_SESSION["TechID"];
?>

This works, but, only after I refresh the page a second time. For example, I visit the page, nothing, I refresh the page and everything comes up fine. Any clues why this is happening.
Post Reply