title: $id = $_GET['id'] : variable is not working
body: <p>I am trying to send email by
  1) Using $_GET['id'] to define the mysql row
  2) Extract the relevant info from the database, including the email address and 
  3) Send email to the extracted email address.</p>
  
  <p>No errors are reported with error reporting on (note that pasted code has them commented out), but the variables below ($street2 and $email) don't seem to be retained via the include file. The echo's all work fine when they are not commented out. When I replace the $email variable (on the include file, not shown) with an actual email address, everything sends fine.</p>
  
  <p>I think the main thing to note is in Line 9, if I define the $id, then everything works fine. However, if I try to use $_GET to define the $id variable, then the echoed variables still show up fine (meaning the db queries are successful), but the include file doesn't work.</p>
  
  <p>Here is my code. It is placed above the HTML form. I've included some comments within the code so you can have a better idea of what has worked or not.</p>
  
  <pre><code>&lt;?php
  session_start() or die("Could not start session.");
  
  //error_reporting(E_ALL);
  //ini_set('display_errors', '1');
  $id = 0;
  if(isset($_GET['id']) &amp;&amp; is_numeric($_GET['id']))
      $id = (int)$_GET['id'];
  //$id=4;
  //if Line 9 is not commented out, then the whole script works fine and email is sent
  require('connect.php');
  
  $query1 = mysql_query("SELECT street2 FROM prop_one WHERE sellerID='$id'") or die("OOPS: Bad    query1");
  $row1 = mysql_fetch_assoc($query1, MYSQL_NUM);
  $street2 = $row1[0];
  //echo "This is $street2";
  
  $query2=mysql_query("SELECT email FROM account WHERE sellerID='$id'") or die("OOPS: Bad query2");
  $row2 = mysql_fetch_assoc($query2, MYSQL_NUM);
  $email = $row2[0];
  //echo "&lt;br&gt;This is $email";
  
  if (isset($_POST['submit']))
  {
  include_once("emailSeller_inc.php");
  }
  ?&gt;
  </code></pre>
  
  <p>Here is the form:</p>
  
  <pre><code>&lt;form action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;" method="POST" name="emailToSeller"&gt;
  &lt;fieldset&gt;
    &lt;legend&gt;Your Contact Info
    &lt;/legend&gt;
    &lt;label for="conFName"&gt;First name*&lt;/label&gt;
    &lt;input name="conFName" type="text" id="conFName" value="&lt;?php echo stripslashes(htmlentities($conFName)) ?&gt;" placeholder="required" required = "required" size="35" maxlength="50"/&gt;
  &lt;label for="conLName"&gt;Last name&lt;/label&gt;
  &lt;input name="conLName" type="text" id="conLName" value="&lt;?php echo stripslashes(htmlentities($conLName)) ?&gt;" size="35" maxlength="50"/&gt;
  &lt;label for="conEmail"&gt;Email*&lt;/label&gt;
  &lt;input name="conEmail" type="email" id="conEmail" value="&lt;?php echo stripslashes(htmlentities($conEmail)) ?&gt;" placeholder="required" required="required" size="35" maxlength="50"/&gt;
  &lt;label for="conTel"&gt;Phone&lt;/label&gt;
      &lt;input name="conTel" type="text" id="conTel" value="&lt;?php echo stripslashes(htmlentities($conTel)) ?&gt;" placeholder="" size="25" maxlength="15"/&gt;&amp;nbsp;e.g., 555.555.5555
  &lt;/fieldset&gt;
  
  &lt;fieldset style="text-align: center; position: absolute; top: -200; z-index: -1000;"&gt;
  &lt;input class="teaser" type="submit" name="submit" id="submit" value="Submit"/&gt;
  &lt;/fieldset&gt;
  
  &lt;fieldset&gt;
    &lt;legend&gt;Your Message
    &lt;/legend&gt;
    &lt;label for="conSubject"&gt;Subject*&lt;/label&gt;
    &lt;input name="conSubject" type="text" id="conSubject" value="&lt;?php echo stripslashes(htmlentities($conSubject)) ?&gt;" placeholder="required" required="required" size="35" maxlength="50"/&gt;
    &lt;label for="conMessage"&gt;Message*&lt;/label&gt;
    &lt;textarea name="conMessage" type="textarea" id="conMessage" placeholder="required" required="required" cols="50" rows="8" maxlength="400"/&gt;&lt;?php echo stripslashes(htmlentities($conMessage)) ?&gt;&lt;/textarea&gt;
  
    &lt;label class="teaser"&gt;Email&lt;/label&gt;
    &lt;input class="teaser" name="validate" id="validate" type="text" autocomplete="off" /&gt;
  &lt;/fieldset&gt;
  
  &lt;fieldset style="text-align: center"&gt;
    &lt;input class="button" type="submit" name="submit" id="submit" value="Send email"/&gt;
  &lt;/fieldset&gt;
     &lt;/form&gt;
    &lt;/div&gt;
  </code></pre>