mme Posted August 2, 2008 Share Posted August 2, 2008 Hi I am trying to see if javascript is turned off using php. <?php $java=1; ?> <noscript> <?php $java=0; ?> </noscript> Why isn't this code working? Thanks Link to comment https://forums.phpfreaks.com/topic/117788-javascript-and-php/ Share on other sites More sharing options...
.josh Posted August 2, 2008 Share Posted August 2, 2008 because php is parsed on the server and the output is then sent to the browser. Your browser doesn't know anything about $java. By the time it gets to the browser all it sees is your tags. Link to comment https://forums.phpfreaks.com/topic/117788-javascript-and-php/#findComment-605828 Share on other sites More sharing options...
unkwntech Posted August 2, 2008 Share Posted August 2, 2008 Check this out http://unkwndesign.com/blog/?p=10 Link to comment https://forums.phpfreaks.com/topic/117788-javascript-and-php/#findComment-605979 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.