ive been making a code 2 use cookies for my mobile script i put in a code 2 give a error if cookie cant be stored for older mobiles or ppl that turn cookies off but ppl are getting the error then when they reload it comes up wif the site any suggestions 2 fix this
the code im using is
the code im using is
PHP Code:
<?php
define('DRK',true);
putenv("TZ=Australia/Sydney");
session_name("session_id");
session_start();
$act = get_var("act");
$mode = get_var("mode");
if ($act == "index") unset($_SESSION['uid']);
if (!isset($_SESSION['username'])) $_SESSION['username'] = "Guest";
if (!isset($_SESSION['ses'])) $_SESSION['ses'] = "Guest_".substr(md5(time()),0,12);
if (empty($act)) header("Location: http://$_SERVER[SERVER_NAME]/?act=index");
if (!isset($_COOKIE['session_id'])) die("You must enable cookies to use this site"); // this is where the problem lies
Comment