This has been a problem that's been plaguing me throughout multiple projects. I'm assuming others have run against the problem and either 1) Can help, or 2) Would benefit from this thread.
IS THERE ANY WAY TO TURN A JAVASCRIPT VARIABLE INTO A PHP VARIABLE!?
the only way I see is to generate (document.write...) hidden fields in a form and post the data to a php file. Anyway it will require an exchange between client and server.
Or you could generate a document with javascript that would post itself in a popup and kill itself after adding session info in PHP... you could even hide this page and have no change to origin page 😃
heres a simple way
<? if(isset($name)) echo $name; else{ ?> <script> blah=prompt("enter your name",""); if(blah) location="<?=$PHP_SELF?>?name="+blah; </script> <?}?>
i like bunkers answer better though, that slipped my mind when i wrote this
$drink->1664(😃);
Originally posted by Bunkermaster $drink->1664(😃);
😕 im slow :p and whats RTFM????
1664 (Kronenbourg) is the brand I am gulping down at an alarming rate right now
RTFM is Read The Friendly (more often known as Fucking) Manual