the following code, is to check to see if javascript is enabled, and if not, it goes to a page without frames. And if the javascript is enabled, it goes to a a page with frames. As well I would like the script to check for cookies enabled. So what I am really looking for is, a php to first search for cookies enabled and then javascript enabled, if only one or none of them are enabled, I want the user to be sent to one page, if both are enabled, then the the user is sent to a page that is set up for both and has frames.
The code that follows does not do the javascript part of the check:
<?PHP
$js = $_GET[“js”];
if($js==0){
setcookie(“js”, 0, time()+60*60*30, ‘/’, ‘.foxvalleynews.com’);
echo (‘<html>
<title>Fox Valley Newspapers</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>
<frameset cols=”134,*“>
<frame name=”leftFrame” scrolling=”NO” noresize src=”index-2.html”>
<frame name=”mainFrame” src=”index-1.html”>
</frameset>
<noframes>
<body bgcolor=”#FFFFFF” text=”#000000″>
</body>
</noframes>
</html>’);
} else if($js==1) {
setcookie(“js”, 1, time()+60*24
echo (‘<html>
<title>Fox Valley Newspapers</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>
<frameset cols=”134,*” frameborder=”NO” border=”0″ framespacing=”0″ rows=”
<frame name=”leftFrame” scrolling=”NO” noresize src=”index-2.html”>
<frame name=”mainFrame” src=”index-withJavaScript.html”>
</frameset>
<noframes>
<body bgcolor=”#FFFFFF” text=”#000000″>
</body>
</noframes>
</html>’);
} else {
echo (“<h1>Please click <a href=”jsEnabled.php”>here</a></h1>”);
}
echo $
?>
Thanks