ms1990kl Posted March 1, 2009 Share Posted March 1, 2009 This is probably basic, but I want to tell my program that this is the first opening of the current session so that my program will load all my default values in my forms. After some inputs are submitted, I want the program to know that the session is no longer at the beginning. Is there some session variable that is set upon opening of the session, then unset after inputs are submitted? Thanks, Mike Quote Link to comment https://forums.phpfreaks.com/topic/147367-telling-the-program-that-this-is-the-first-opening-of-page/ Share on other sites More sharing options...
RussellReal Posted March 1, 2009 Share Posted March 1, 2009 <?php session_start(); if (!isset($_SESSION['first'])) { // load defaults here $_SESSION['first'] = 1; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/147367-telling-the-program-that-this-is-the-first-opening-of-page/#findComment-773566 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.