title: Inserting symbols in mysql using php
body: <p>I'm using php and mysql and I have a problem with inserting latitude and longitude values along with the <strong>degree, min and sec symbols.</strong> that is (°,',") symbols.</p>
  
  <p>I have referred several sites and tried different ways but i just can't solve it. </p>
  
  <p>First i tried copying symbols and concatenating with the 3 user input values.</p>
  
  <pre><code>$latitude=$degree.'°'.$min.'''.$sec.'?'.'N';
  </code></pre>
  
  <p>Then after executing the insert query,the $latitude variable value is inserted in database, but the symbols are replaced by random characters as shown here.</p>
  
  <pre><code>2Ëš3Ê¼4Ë®N (data stored in database)
  </code></pre>
  
  <p>Then i tried using html character code instead of symbols.</p>
  
  <pre><code>$latitude=$degree.'&amp;deg'.$min.'&amp;#8217'.$sec.'#8221'.'N';
  </code></pre>
  
  <p>But it doesn't work.It displays the same html characters in databse.</p>
  
  <p>I don't know whether it is a problem with html entities or something.</p>