title: syntax error, unexpected T_VARIABLE
body: <p>Hi this is my first post on here so any response would be greatly appreciated. I'm working on a complex php form and keeping getting this error.
  Parse error: syntax error, unexpected T_VARIABLE in /home2/happyusa/dev/member/rec_id_check.php on line 8  </p>
  
  <pre><code>&lt;script&gt;
  function check_rec_id(obj) {
  
      if(obj.value.length &lt; 6) {
      document.this_form.recidcheck.value = 'N';
      $('#check_rec_id_msg').html('recID must be over 6 letters');
      $('#check_rec_id_msg').css('color','red');
      return;
  }
  $.ajax({
      type: 'post', 
      async: true, 
      url: '/member/rec_id_check.php',
      data: 'id=' + encodeURIComponent(obj.value),
      beforeSend: function() {
          //$('#ajax_load_indicator').show().fadeIn('fast'); 
      }, 
      success: function(data) {
          $('#check_rec_id_msg').html(data);
          return;
      },
      error: function(data, status, err) {
          alert('fail to connect to server');
      }, 
      complete: function() { 
          //$('#ajax_load_indicator').fadeOut();
      }
  });
  return;
  }
  &lt;/script&gt;
  
  &lt;td&gt;&lt;input name="rec_uid" type="text" class="input-style" id="rec_uid" style="width:250px; border-color: #0066ff" maxlength="12" onKeyUp="check_rec_id(this)"&gt;
  </code></pre>
  
  <p></p>
  
  <p>follow is /member/rec_id_check.php</p>
  
  <pre><code>1 
  2
  3
  4
  5
  6 $rec_uid = trim($rec_uid)
  7
  8 $sql = "select count(*) from member where uid = '$rec_uid'";
  9 $result = mysql_query($sql);
  10 $rowcount = mysql_result($result, 0, 0);
  11
  12 if ($rowcount &gt; 0) {
  13    echo "recID is available";
  14  echo "&lt;script&gt;$('#check_rec_id_msg').css('color','blue');&lt;/script&gt;";
  15  exit;
  16 }
  17
  18     elseif ($rowcount = 0) {
  19  echo "recID is not available";
  20  echo "&lt;script&gt;$('#check_rec_id_msg').css('color','red');&lt;/script&gt;";
  21  exit;
  22 }
  </code></pre>
  
  <p>Parse error: syntax error, unexpected T_VARIABLE in /home2/happyusa/dev/member/rec_id_check.php on line 8</p>
  
  <p>My QUESTION
  What is wrong? I need your help!!!!</p>