title: Can't update SQL database with quotes using PHP
body: <p>I recently updated PHP to 5.4 and I'm starting to get some errors on some old, existing code.
  I have content I'd like to update in MySQL like so:</p>
  
  <pre><code>It was therefore extremely fitting that the trip also included the release of 'Bunny', a juvenile
  </code></pre>
  
  <p>The code I have used to work:</p>
  
  <pre><code>$upsql = "UPDATE webpg_tbl SET txt = '$_POST[txt]' WHERE id='$_POST[modify]'";
  </code></pre>
  
  <p>I thought it may be a syntax issue, I added the double quote and "." into the query like so:</p>
  
  <pre><code>$upsql = "UPDATE webpg_tbl SET txt = '".$_POST[txt]."' WHERE id='".$_POST[modify]."'";
  </code></pre>
  
  <p>But when the query is executed:</p>
  
  <pre><code>$result = mysql_query($upsql) or print mysql_error() ;
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Bunny', a juvenile green turtle rescued on the 4t' at line 3 
  </code></pre>
  
  <p>I am pretty confident it's the quotes causing the issue. Is there something in PHP I can use to make it accept quotes?
  I'm aware the code I'm working with is outdated. But due to time/budget constraints. I'm forced to just make it work for the time being.</p>