TeraByTe_mybb_import8935 Member Joined May 11, 2011 Posts 95 Reacts 0 Reputation 0 Credits 0 Jun 15, 2011 #1 This will set our session as the current time (md5 encoded) Open PHP Tags PHP: <?php Start the session : PHP: session_start(); set our session "sid" as an md5 encoded version of our current time : PHP: $_SESSION['sid'] = md5(time()); set variable $sid as our session : PHP: $sid = $_SESSION['sid']; display our session to the page : PHP: echo $sid; Close PHP tags PHP: ?> Full code : Spoiler PHP: <?php session_start(); $_SESSION['sid'] = md5(time()); $sid = $_SESSION['sid']; echo $sid; ?> Live Demo: http://dev.hallwayinsider.com/ses.phpOur next tutorial : Cookies
This will set our session as the current time (md5 encoded) Open PHP Tags PHP: <?php Start the session : PHP: session_start(); set our session "sid" as an md5 encoded version of our current time : PHP: $_SESSION['sid'] = md5(time()); set variable $sid as our session : PHP: $sid = $_SESSION['sid']; display our session to the page : PHP: echo $sid; Close PHP tags PHP: ?> Full code : Spoiler PHP: <?php session_start(); $_SESSION['sid'] = md5(time()); $sid = $_SESSION['sid']; echo $sid; ?> Live Demo: http://dev.hallwayinsider.com/ses.phpOur next tutorial : Cookies
Factor8™ Active Member Joined Mar 19, 2011 Posts 1,516 Reacts 0 Reputation 0 Credits 0 Jun 16, 2011 #2 I like your tutorials.