title: Registration system with php and mysql
body: <p><strong>im new to php and mysql (using wamp)</strong></p>
  <p>im getting the following error when i run my script, any idea what to fix?</p>
  <blockquote>
  <p>Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in C:\wamp64\www\web1\Register.php on line 79</p>
  <p>Warning: mysqli_query() expects parameter 1 to be mysqli, string given in C:\wamp64\www\web1\Register.php on line 81</p>
  </blockquote>
  <p><strong>line 79 t0 83</strong></p>
  <pre><code> 79   mysqli_select_db($database_localhost, $localhost);
   80   $query_Register = &quot;SELECT * FROM mytable&quot;;
   81   $Register = mysqli_query($query_Register, $localhost) or die(mysql_error());
   82   $row_Register = mysql_fetch_assoc($Register);
   83   $totalRows_Register = mysql_num_rows($Register);
  </code></pre>
  <p>Here is the database connection:</p>
  <pre><code>&lt;?php
  # FileName=&quot;Connection_php_mysqli.htm&quot;
  # Type=&quot;mysqli&quot;
  # HTTP=&quot;true&quot;
  $hostname_localhost = &quot;localhost&quot;;
  $database_localhost = &quot;mydatabase&quot;;
  $username_localhost = &quot;root&quot;;
  $password_localhost = &quot;&quot;;
  $localhost = mysqli_connect($hostname_localhost, $username_localhost, $password_localhost) or trigger_error(mysql_error(),E_USER_ERROR); 
  ?&gt;
  </code></pre>