Passing a PHP Value from a link
<p>I am new to PHP and learning. I'm trying to pass a value through a url link but it doesn't seem to work.</p>

<p>The link value I am passing is <a href="http://www.mysite.com/index.php?id=f" rel="nofollow">http://www.mysite.com/index.php?id=f</a></p>

<p>I want to run a js script if ID not F seen below but right now when I run it. It doesn't do anything:</p>

<pre><code>&lt;?php
$ShowDeskTop = $_GET['id'];
if (isset($ShowDeskTop)){
    echo $ShowDeskTop;

    if ($ShowDeskTop != "f"){
       echo "ShowDeskTop Value is not F";
               echo "&lt;script type=\"text/javascript\"&gt;";
       echo "if (screen.width&lt;800)";
       echo "{";
       echo "window.location=\"../mobile/index.php\"";
       echo "}";
       echo "&lt;/script&gt;";  
    };
};
?&gt;
</code></pre>

<p>I know this is easy PHP 101 but I can't figure it out. I have tried everything from w3schools to other sites on Google for the answer and having no luck. Could someone please tell me what I am doing wrong?</p>

<p>Thank you!</p>
