title: Can't connect to database "Fatal error: Call to undefind function mysqli_connect()"
body: <p>I've been scouring this site for 5 hours now trying to get this sorted, I rarely ask for help but this is one of the weirdest and most annoying things I've encountered.</p>
  <p>First of all I'd like to say that this DID work fine, I have limited examples of what the cause is but I'll list them anyway.</p>
  <p>Here's the full error message:</p>
  <blockquote>
  <p>Fatal error: Call to undefind function mysqli_connect() in C:\wamp\www\game\connect.php on line 3</p>
  </blockquote>
  <p>And here's the code</p>
  <pre><code>&lt;?php
  // Create connection
  $con=mysqli_connect(&quot;localhost&quot;,&quot;root&quot;,&quot;&quot;,&quot;game&quot;);
  
  // Check connection
  if (mysqli_connect_errno()) {
  echo &quot;Failed to connect to MySQL: &quot; . mysqli_connect_error();
  }
  
  
  $select_db = mysqli_select_db($con, 'game');
  if (!$select_db){
  die(&quot;Database Selection Failed&quot; . mysql_error());
  }
  ?&gt;
  </code></pre>
  <p>Weird thing is, it was working completely fine and just suddenly stopped, this has happened more than once.</p>
  <p>Here's what I've tried:</p>
  <p>Checking the extensions are enabled -
  Rebooting various times -
  Setting the correct php path -
  Using many example codes that &quot;work&quot; -</p>
  <p>I also had some code that inputted data straight from phpdesigner into the database, which successfully worked, but that no longer works and I've made literally 0 changes.</p>
  <p>The last time it stopped working, I filled out a registration form on my site as a test (that doesn't work either) and it suddenly went off. When filling in the form I click register and nothing happens besides a refresh.</p>
  <p>Bit extra: In my httpd file the pfp and pfpinidir are as follows</p>
  <p>php5_module&quot;c:/wamp/bin/php/php5.5.12/php5apache2_4.dll&quot;</p>
  <h1>PHPIniDir &quot;C:\wamp\bin\apache\apache2.4.9\bin\php.ini&quot;</h1>