Firstly, my cms is setup with a config file which is always included first with index.php & then the theme file is included, which includes the HTML. So since I need to set the cookies before the HTML, I put the default cookies set in the config file. They use if statements:
Code: Select all
// COOKIE HEADERS
session_start();
if ( $_COOKIE['trans'] == null ) setcookie("trans", "LITV", 0, "/");
if ( $_COOKIE['book'] == null ) setcookie("book", "Genesis", 0, "/");
if ( $_COOKIE['chapter'] == null ) setcookie("chapter", "1", 0, "/");However, when I set any given page to call the cookie information, it won't work and I am going crazy.
Here is an example call:
Code: Select all
$query = "SELECT $fields FROM " . $_COOKIE["trans"] . "$queryextra";What gives?
Thanks in advance!!