title: why mysql data has a single quote when displayed in PHP?
body: <p>Im new to php and i have this code tested with XAMPP at backend</p>
  
  <pre><code>$name = addslashes ($_POST['name']);
  $email = addslashes ($_POST['email']);
  $paswd = addslashes ($_POST['paswd']);
  
  $sql = "INSERT INTO webusers (username,email,paswd)VALUES('$name','$email','$paswd')";
  </code></pre>
  
  <p>and here's my code for displaying data
      include_once('dbcon.php');</p>
  
  <pre><code>$db = mysql_select_db('test');
  
  $sql = "SELECT * FROM webusers";
  
  $result = mysql_query($sql);
  $urow = mysql_num_rows($result);
  
      echo"
          &lt;table border='1'&gt;
  
          &lt;th&gt;ID&lt;/th&gt;
          &lt;th&gt;USERNAME&lt;/th&gt;
          &lt;th&gt;EMAIL&lt;/th&gt;
          &lt;th&gt;PASSWORD&lt;/th&gt;
   ";
  
   if($result &gt; 0){
   while($urow = mysql_fetch_array($result)){
  
  
  
      echo "&lt;tr&gt;";
      echo"   &lt;td class='myinput'&gt;'" .$urow['id']. "'&lt;/td&gt;";
      echo"   &lt;td class='myinput'&gt;'" .$urow['username']. "'&lt;/td&gt;";
      echo"   &lt;td class='myinput'&gt;'" .$urow['email']. "'&lt;/td&gt;";
      echo"   &lt;td class='myinput'&gt;'" .$urow['paswd']. "'&lt;/td&gt;";
      echo "&lt;/tr&gt;";   
  
      echo"&lt;/table&gt;";
      }
      }else{
  
  echo"No record";
  
      }
    ?&gt;
  </code></pre>
  
  <p>Those code works, except for the data which surprise me why it has a single quote when i show/display it on a table. though i input the data in html . and my magic_quote_gpc was off. is there something i missed or anything wrong with my code? or there is something with my database collation?</p>
  
  <p>i also tried mysql_real_escape_string and mysql_escape_string, nothings change.</p>
  
  <p>thanks for the help.</p>
  
  <p>Otep</p>