HI! I'm trying to pass a javascript variable to PHP and it's not working! I have seen examples of where you can pass javascript variables to PHP _GET and post with URL variables. I DONT want to do that. Is there any way you can get this script to work? See below:
<?php
$java1 = "<script language=\"javascript\"> [login to view URL]([login to view URL])";
$java2 = ";";
$java3 = " </script>";
$screen_width= $java1 . $java2 . $java3;
$screen_width1 = "$screen_width";
echo "screen_width1=" . $screen_width1;
$myinteger = (integer)$screen_width1;
echo "myinteger=" . $myinteger;
if ($myinteger > 1369)
? ? ? ? {
? ? $BROWSER_RES="LG";
? ? }
elseif ($myinteger? > 1209)
? ? {
? ? $BROWSER_RES="MD";
? ? }
elseif ($myinteger? >= 1024)
? ? {
? ? $BROWSER_RES="SM";
? ? }?
? ?
echo "BROWSER_RES=" . $BROWSER_RES;
?>