Related Articles
REMEMBER LOGIC IN LOGIN
On Login: if(isset($_POST[‘remember’])) { $month = time() + ( ( 3600 * 24 ) * 30 ); setcookie(‘remember_me’, $user_id, $month); } else { $past = time() – 100; setcookie(‘remember_me’, ”, $past); } On Logout: $past = time() – 100; setcookie(‘remember_me’, ”, $past); if( isset($_COOKIE[‘remember_me’]) AND trim($_COOKIE[‘remember_me’] ) != “” ) { //Store the sessions which […]
DIFFERENCE BETWEEN TWO DATES
$date_a = new DateTime(‘2010-10-20 08:10:00’); $date_b = new DateTime(‘2008-12-13 10:42:00’); $interval = date_diff($date_a,$date_b); echo $interval->format(‘%h:%i:%s’);
ADD A COOKIE CONSENT FEATURE
?php%20echo%20SITE_URL;%20?js/jquery.min.js?php%20echo%20SITE_URL;%20?js/jquery.cookieMessage.min.js $.cookieMessage({‘mainMessage’: ‘This website uses cookies. By using this website you consent to our use of these cookies. For more information visit our “>Privacy Policy. ‘,‘acceptButton’: ‘Got It!’,‘fontSize’: ’16px’,‘backgroundColor’: ‘#222’,});