Метод GET из JavaScript в PHP
Задаем переменную f ():
<script>f=''</script>
Передаем переменную f методом GET из JavaScript в PHP:
<?if(isset($_GET[g])){$h=$_GET[g];echo$h;}else{echo'<script>document.location.href="'.$_SERVER[REQUEST_URI].'?g="+f</script>';}?>
Warning: Use of undefined constant g - assumed 'g' (this will throw an Error in a future version of PHP) in /home/vhosts/podolsk.xp3.biz/ph/ph58/2.php on line 7
Warning: Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' (this will throw an Error in a future version of PHP) in /home/vhosts/podolsk.xp3.biz/ph/ph58/2.php on line 7
)