Error on line that doesnt exist
<p>I'm trying to define a link based of a $_GET variable, but it's saying there's an error on a line that doesn't exist...</p>

<pre><code> &lt;?php

if(isset($_GET['ref'])){
    if(!empty($_GET['ref']))
    {
        $ref = $_GET['ref'];
    }
?&gt;

&lt;?php

      if ($ref != "") {
  $link = "http://site.com/page.php?ref=$ref";
} else {

 $link = "http://site.com/page.php";
    }

?&gt;
</code></pre>

<p>Anyone see what's up? I was pretty sure it was fine.</p>

<p>I've tried it multiple different ways, with isset etc... same result.</p>
