title: Most bizarre PHP/ MySQL bug
body: <p>I have a search page that takes what you searched for (via POST) and then inserts it in a table. I had it email the query to me so I could see what was going on:</p>
  
  <p>My PHP that gets the variable:</p>
  
  <pre><code>$searched = mysql_real_escape_string($_POST['searched']);
  </code></pre>
  
  <p>The query that uses it (emailed to me):</p>
  
  <pre><code>INSERT INTO conversations (viID, moID, viTyping, moTyping, priority, status, open, mOpen, lastMsgID, searched) VALUES (435, 0, 0, 0, 0, 0, 1, 1, 0, "
  </code></pre>
  
  <p>Here is the code that assembles the query:</p>
  
  <pre><code>$query = "INSERT INTO conversations (viID, moID, viTyping, moTyping, priority, status, open, mOpen, lastMsgID, searched) VALUES ($userID, 0, 0, 0, 0, 0, 1, 1, 0, \"$searched\")";
  </code></pre>
  
  <p>Whenever the page runs from IE, this inserts the record in the DB just fine. Any other brower leaves out the "question8" part (it still inserts a record), even though the query is EXACTLY THE SAME! I can cut and paste the query in phpMyAdmin and it runs just fine.</p>
  
  <p>Why would this only work in IE? Are the other browsers inserting some special characters I can't see in there? I'm lost!</p>