If statements with passed variables
<p>Basically I'm grabbing a variable from the url and I need to send the user to custom pages based on what state they fill in. i.e. if it's one of the coverred states, they'll get sent to custom pages...but if it's any other state they get sent to the standard one.</p>

<p>I'm guessing it's just a simple if statement with an else...but for some reason I can't get it to work properly. </p>

<pre><code>&lt;?php
$state = urlencode($_GET['state']);
if ($state=="california"){$link = "http://website.com/page1";}
else if ($state=="new york"){$link = "http://website.com/page2";}
else if ($state=="ohio"){$link = "http://website.com/page3";}
else  {$link = "http://website.com/default";}
header("Location: $link");
?&gt;
</code></pre>

<p>Is this right or should I be doing something else?</p>
