PHP - removing a backslash from an apostrophe
<p>The code below allows the user to enter in a phrase in plain English, which is then added to  a database as "$site."  If the user enters in an apostrophe, the phrase is stored with a backslash in front of the apostrophe.  How can I get the variable "$site" to be added to the database without backslashes in front of apostrophes?</p>

<p>Thanks in advance,</p>

<p>John</p>

<pre><code>print   "&lt;div class=\"siteadd\"&gt;
     &lt;form action='process.php?find=$find1' method='post'&gt;
     Add a book to this topic: &lt;input name='site' type='text' size='50'&gt;
     &lt;input type='submit' value='Submit'&gt;
     &lt;/form&gt; 
     &lt;/div&gt;";
</code></pre>

<p>Then, on process.php:</p>

<pre><code>$site = str_replace($remove_array, "", $_POST['site']);
$site = strtolower($site);
$site = mysql_real_escape_string($site);
$illegal = array("/", "\"");
$site = str_replace($illegal, '', $site);

mysql_query("INSERT INTO `$find` VALUES (NULL, '$site',1,0)");
</code></pre>
