title: How Use get method to do different functions PHP .?
body: <p>I wrote a simple php file to open different websites using different URLs. 
  PHP code is here.(it's file name is user.php)</p>
  
  <pre><code>&lt;?php 
  
  $id =  $_GET["name"] ;
  
   if ($id=joe) {
  
  header('Location: http://1.com');
  }
  
   if ($id=marry) {
  
  header('Location: http://2.com');
  }
  
   if ($id=katty) {
  
  header('Location: http://3.com');
  }
  
  ?&gt; 
  </code></pre>
  
  <p>I used those 3 methods to call php file. </p>
  
  <pre><code>1.http://xxxxxx.com/user.php?name=joe
  2.http://xxxxxx.com/user.php?name=marry
  3.http://xxxxxx.com/user.php?name=katty
  </code></pre>
  
  <p>But php file opens only <a href="http://3.com" rel="nofollow noreferrer">http://3.com</a> at every time.How to fix this.?
  how to open different websites for each names.?</p>