Can I create a variable with JavaScript that PHP can recognize?
Posted
by zeckdude
on Stack Overflow
See other posts from Stack Overflow
or by zeckdude
Published on 2010-04-02T08:31:14Z
Indexed on
2010/04/02
8:33 UTC
Read the original article
Hit count: 200
I have a series of PHP statements that I only want to run if javaScript is enabled.
if($js_enabled == 'yes') {
//Run a series of PHP statements
}
My problem is that I want to create that $js_enabled variable with javaScript. Therefore, if javaScript is enabled, the variable will be created and the PHP statements will be run, but if javaScript is not enabled, the variable will never be created and the PHP statements will not run.
How can I create a variable with JavaScript that PHP can recognize?
© Stack Overflow or respective owner