I want use a single php file to handle all of my voting requests.
Currently the script will, if siteType
isn't set, forward the user and display a message. If the user has JS
on then it will return a json object and ajax the page.
if(!isset($_COOKIE['siteType'])){
displayMessages('bad', 'Before you can continue you must select which category you would like to be in.');
header('Location:/');
exit;
}
I need it as that if this php code above is executed the page will reload, i assume with javascript and reading the http headers?
[Edit] I didn't make myself clear enough, but this is a ajax request. I don't output any html. So this really is just about getting js to handle the header?