title: Prevent inserting data to database if data is exist
body: <p>How to prevent inserting data to database if data is exist in database</p>
  
  <p>ex : I have data </p>
  
  <pre><code>for ($i = 1; $i &lt;= 10; $i++) {
      $text = "Orange";
      mysql_query("INSERT INTO fruit (text) VALUES ('$text')");
  }
  </code></pre>
  
  <p>I want the text "orange" is inserted once to the "fruit" table <br/>
  and if there is text "Orange" again its not inserted to the "fruit" table<br/>
  because the data is exist and have been inserted before</p>