Hi; I have a mobile script from detectmobilebrowsers.com that will redirect the user to my mobile site however I also wish that when the URL "http://mysite.com/?mobile=no" is entered a session will be created that won't redirect the user on every page of my site...
$mobile=$_GET['mobile'];
if(isset($_SESSION['mobile'])){
if($_SESSION['mobile']==="no"){
complete();
}
}
if($_SESSION['mobile']==="no"){
complete();
}
if($_SESSION['mobile']!="no"){
checkMobile();
}
function checkMobile(){
// MOBILE CODE TAKEN OUT TO SAVE SPACE
gotoMobile();
}
function gotoMobile(){
echo "<script>window.location='http://m.MySite.org/';</script>";
}
function complete(){
echo "<h1 align='center'>Redirecting...</p>";
}
Sorry if I seem confusing but in short terms: Mobile Detection (which is set)... make session mobile=no if user does wishes to view full site and when that session is created it is checked on everypage (same php script) and if I set my session for no mobile I want that to stay on everypage...
Thanks in Advanced :)