title: PHP: Set Variable to Get Value
body: <p>I am creating a game web site using PHP and I want to just use one page for the game rather than have a bunch. I want to have the info entered like this:</p>
  
  <p>`?swf=[path to .swf]&amp;name=[name of game]&amp;description=[Description of Game]&amp;instruction=[Instructions for game]``</p>
  
  <p>The problem is that if there is no data entered in the URL it returns a black page. I want to use the if...else to display a featured game if nothing is in the URL. The code I have right now is:</p>
  
  <pre><code>&lt;?php $name=$_GET["name"];
  if ($name=="*")
  echo "&lt;h3&gt;$name"&lt;/h3&gt;;
  else
  echo "Featured Game Name";
  ?&gt;
  
  &lt;?php $description=$_GET["description"];
  if ($description=="*")
  echo "&lt;h5&gt;$description&lt;/h3&gt;;
  else
  echo "&lt;h5&gt;Featured Game Description&lt;/h5&gt;";
  ?&gt;
  
  &lt;object type="application/x-shockwave-flash" data="
  &lt;?php $swf=$_GET["swf"];
  if ($swf=="*")
  echo "$swf;
  else
  echo "Featured Game swf path";
  ?&gt;
  " width="700" height="400"&gt;
  &lt;param name="movie" value="
  &lt;?php $swf=$_GET["swf"];
  if ($swf=="*")
  echo "$swf;
  else
  echo "Featured Game swf path";
  ?&gt;
  " /&gt;
  &lt;/object&gt;
  
  &lt;?php $instruction=$_GET["instruction"];
  if ($instruction=="*")
  echo "&lt;p&gt;$instruction&lt;/p&gt;;
  else
  echo "Featured Game Instruction";
  ?&gt;
  </code></pre>
  
  <p>Can anyone offer any suggestions on ways to accomplish this?</p>