Source code
<?php
ob_start();
session_start();
//Needs html tags to work !!
//Needs html tags to work !!
?>
<html>
<body>
<a href="http://snippets.bluejon.co.uk/index.php"/>MENU</a>
<?php
$_SESSION['js']= array_key_exists('js', $_POST) ? $_POST['js'] : '';
if (empty($_SESSION['js'])){
?>
<form name="postJs" action="<?php echo $PHP_SELF ?>" method="post">
<input type="hidden" name="js" value="on">
</form>
<script type="text/javascript">
<!--
document.postJs.submit();
//-->
</script>
<?php
}
if ($_SESSION['js']== "on"){
print"<h3>Javascript is ON</h3><br>";
print"Php code can be added here!<br>";
}else{
print"<h3>Javascript is OFF</h3><br>";
print"Php code can be added here!<br><br><br>";
}
ob_end_flush();
?>
<a href="http://snippets.bluejon.co.uk/check4-js-and-cookies/check4-js-enabled-v2-phpcode.php">Display php source code </a>
</body>
</html>