DETECT JS USING PHP (SERVER SIDE)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mhonnphp
Forum Commoner
Posts: 37
Joined: Fri Oct 12, 2007 11:29 pm
Location: Philippines
Contact:

DETECT JS USING PHP (SERVER SIDE)

Post by mhonnphp »

Guys,

Is there any way that I can Detect if Javascript is ON thru server side using PHP?
Please lend me your codes.. or any tips! thanks and Godbless.

Raymonn
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: DETECT JS USING PHP (SERVER SIDE)

Post by onion2k »

Can't be done with PHP. There are a few ways to test though ... one is to set a JS variable in a form (or a cookie) that you check when the user clicks something, or forward the user to a form that automatically submits itself if JS is enabled.
mhonnphp
Forum Commoner
Posts: 37
Joined: Fri Oct 12, 2007 11:29 pm
Location: Philippines
Contact:

Re: DETECT JS USING PHP (SERVER SIDE)

Post by mhonnphp »

onion2k wrote:Can't be done with PHP. There are a few ways to test though ... one is to set a JS variable in a form (or a cookie) that you check when the user clicks something, or forward the user to a form that automatically submits itself if JS is enabled.


8O ah ok! thanks for the reply.. I'll try it
bluejon
Forum Newbie
Posts: 1
Joined: Wed May 07, 2008 6:11 pm

Re: DETECT JS USING PHP (SERVER SIDE)

Post by bluejon »

I have some code which detects javascript with php.
It can be found at
http://snippets.bluejon.co.uk/
bluejon
Post Reply