php - how to save date for the second run of my application -
here did:
$time1 = date('h:i'); $time2 = null; $time_array = array($time1, $time2);
$time1 current time. every time run script, shows moment.
i explain want do:
at t=0 (initial) (first time run code)
$time1 = 10:14:26;
(the date value want saved use of second run of code)
i think want use session variables. remember, if user has cookies or private browsing enabled not work.
session_start(); if (isset($_session['time_1'])) { $time2 = $_session['time_1']; } $_session['time_1'] = date('h:i'); $time_array = array($_session['time_1'], $time2);
Comments
Post a Comment