title: Parse error: syntax error, unexpected T_IF, expecting ',' or ';'
body: <p>This is a simple form for submitting a listing into a database of real estate listings. It's my first time ever doing this, so if you notice anything I'm doing that is bad practice or just stupid in any way, please let me know. </p>
  
  <p>Anyway, on to the error I'm getting:</p>
  
  <pre><code>Parse error: syntax error, unexpected T_IF, expecting ',' or ';' in C:\Program Files\EasyPHP-5.3.9\www\addform.php on line 62
  </code></pre>
  
  <p>I don't see any lines that are missing semicolons, and line 62 is an if statement.... What's this error about?</p>
  
  <pre><code>&lt;?php
  //set database login variables
  require_once 'login.php'; 
  
  //connect to server
  $db_server = mysql_connect($db_hostname, $db_username, $db_password); 
  
  //all server access lines have to be dealt with better than this. See page 227. Probably create a function. 
  
  //Note to self: look into try/catch in php
  
  if (!$db_server) die("Unable to connect to database: " . msql_error()); 
  
  mysql_select_db($db_database, $db_server) or die('Unable to select database: ' . mysql_error());
  $submitted = false;
  
  //Checking if values were passed
  if (isset($_POST['area']) &amp;&amp;
      isset($_POST['type']) &amp;&amp;
      isset($_POST['price']) &amp;&amp;
      isset($_POST['bedrooms']) &amp;&amp;
      isset($_POST['fullbath']) &amp;&amp;
      isset($_POST['halfbath']) &amp;&amp;
      isset($_POST['sqft']))
      //if passed, set variables accordingly
      {
          $area = get_post('area');
          $type = get_post('type');
          $price = get_post('price');
          $bedrooms = get_post('bedrooms');
          $fullbath = get_post('fullbath');
          $halfbath = get_post('halfbath');
          $sqft = get_post('sqft');
          $submitted = true;
      }
  //optional field
  if (isset($_POST['remarks']))
      {
          $remarks = get_post('remarks');
      }
  else
      {$remarks = '';}
  //form HTML
  echo &lt;&lt;&lt;_END
      &lt;form action="addform.php" method="post"&gt;
      Area: &lt;select name="area" size="1"&gt;
          &lt;option value="Hoboken"&gt;Hoboken&lt;/options&gt;
          &lt;option value="Jersey City"&gt;Jersey City&lt;/options&gt;
          &lt;option value="Weehawken"&gt;Weehawken&lt;/options&gt;
      &lt;/select&gt;&lt;br /&gt;
      Type: &lt;select name="type" size="1"&gt;
          &lt;option value="rent"&gt;Rental&lt;/options&gt;
          &lt;option value="sale"&gt;Sale&lt;/options&gt;
          &lt;option value="commercial"&gt;Commercial&lt;/option&gt;
      &lt;/select&gt;&lt;br /&gt;
      Price: &lt;input type="text" name="price" /&gt;&lt;br /&gt;
      Bedrooms: &lt;input type="text" name="bedrooms" /&gt;&lt;br /&gt;
      Full Bathrooms: &lt;input type="text" name="fullbath" /&gt;&lt;br /&gt;
      Half Bathrooms: &lt;input type="text" name="halfbath" /&gt;&lt;br /&gt;
      Square Feet:    &lt;input type="text" name="sqft" /&gt;&lt;br /&gt;
      Remarks:    &lt;textarea name="remarks" wrap="soft" /&gt;&lt;br /&gt;
      &lt;input type="submit" value="Add Listing" /&gt;
      &lt;/form&gt;
      &lt;br /&gt;
      &lt;br /&gt;
  _END
  //if data was provided, insert it into database and confirm
  if ($submitted) {
      $query = "INSET INTO bix (area, type, price, bedrooms, fullbath, halfbath, sqft, remarks) VALUES('$area', '$type', '$price', $bedrooms', '$fullbath', '$halfbath', '$sqft', '$remarks')";
      if (mysql_query($query)){
          echo "listing inserted.&lt;br /&gt;&lt;/br /&gt;";
      } else {
          echo "insert fail: $query &lt;br /&gt;&lt;br /&gt;";
      }
  }
  </code></pre>