title: Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
body: <p>Im developed PHP user login and registration system, i have a displayed  always this error in my local host , how to fix it?  </p>
  
  <blockquote>
    <p>Deprecated: mysql_connect(): The mysql extension is deprecated and
    will be removed in the future: use mysqli or PDO instead
    (C:\wamp\www\registerations\db.php on line 9)</p>
  </blockquote>
  
  <p>this is my code
  db.php</p>
  
  <pre><code>&lt;?php
  $connection = mysql_connect('localhost', 'root', '');
  if (!$connection){
      die("Database Connection Failed" . mysql_error());
  }
  $select_db = mysql_select_db('register');
  if (!$select_db){
      die("Database Selection Failed" . mysql_error());
  }
  ?&gt;
  </code></pre>