title: PHP Apostrophe issue
body: <p>I have been given a database whose content I can't modify. Everything has been going fine until I was passing some variables in a URL through a link, and an apostrophe in one of the variables (i.e "Frank's Used Cars") is causing the variables behind it to not be passed.</p>
  
  <p>This is what is currently being passed:</p>
  
  <pre><code>&amp;var1=600&amp;miles=44000&amp;var2=Frank
  </code></pre>
  
  <p>When it should be like this:</p>
  
  <pre><code>&amp;var2=600&amp;miles=44000&amp;var2=Frank's%20Used%20Cars%20&amp;var3=111111111
  </code></pre>
  
  <p>As I said the problem is with the apostrophe. I've tried changing the 'dealer' field in my database on PHP myadmin to 'utf8_swedish_ci' and also changed it to this on the MySQL connection collation from 'latin1_swedish_ci'.</p>
  
  <p>Obviously if I take the apostrophe out all is fine and dandy but I can't do this. Any help would be great!</p>
  
  <pre><code>                            echo"&lt;td&gt;";
                  echo$row-&gt;var1;
              echo"&lt;/td&gt;";
              echo"&lt;td&gt;";
                  echo$row-&gt;var2;
              echo"&lt;/td&gt;";
              echo"&lt;td&gt;";
                  echo$row-&gt;dealer;
              echo"&lt;/td&gt;";
              echo"&lt;td&gt;&lt;a href='look.php?price=$row-&gt;price&amp;miles=$row-&gt;miles&amp;dealer=$row-&gt;dealer'&gt;More Info&lt;/a&gt;
  </code></pre>
  
  <p>dynamic url link:</p>
  
  <pre><code>echo"&lt;td&gt;";
                  $url="look.php?make=".urlencode($row-&gt;make)."&amp;model=".urlencode($row-&gt;model)."&amp;colour=".urlencode($row-&gt;colour)."&amp;Reg=".urlencode($row-&gt;Reg)."&amp;miles=".urlencode($row-&gt;miles)."&amp;price=".urlencode($row-&gt;price)."&amp;region=".urlencode($row-&gt;region)."&amp;miles=".urlencode($row-&gt;miles);
              echo"$urlHTML=htmlspecialchars($url)"; 
              echo "&lt;a href=\"$urlHTML\"&gt;More Info&lt;/a&gt;";
              echo"&lt;/td&gt;";
  </code></pre>