Is this correct? If not what is the correct syntax
I am new to php hence trying to learn.
I think that you can do that in your script , in a index.php script , write down this code :
true";
//then you can do echo $JSEnabled to see the result yourself
//in a condition statement ...
if($JSEnabled) {
// ... code for JS Enabled
} else {
// ... code not JS Disabled
}
UPDATE :
$js = null;
$js = (boolean) '';
//the noscript text : false is shown when no js support detected in your browser. this value will be converted to a boolean value for testing purpose.
if($js) {
//if $js gets the no script text , that means that the browser is not supporting the js, so this line will check if $js is set to false , the else statement is fired , otherwise the if statement is fired
echo 'Your javascript is enabled
';
} else {
echo 'Your javascript is disabled
';
}