title: Fatal error: Call to undefined function mysql_connect()
body: <p>I am trying to connect to a database that I created using MAMP. This is my code:</p>
  
  <pre><code>&lt;?php
      $link = mysql_connect("localhost", "root", "pw", "db");
      if (!$link) {
          die('Could not connect: ' . mysql_error());
      }
      echo 'Connected successfully';
      mysql_close($link);
  ?&gt;
  </code></pre>
  
  <p>I am getting this error</p>
  
  <p><code>Fatal error: Call to undefined function mysql_connect()</code></p>
  
  <p>I tried echo phpinfo(); to check my path and make sure that I have mySQL which I do. </p>
  
  <pre><code>Path =&gt; C: \ProgramData\ Oracle\ Java\ javapath;
  C: \iverilog\ samples &gt; ;
  C: \Windows;
  C: \Windows\ System32\ Wbem;
  C: \Windows\ System32\ WindowsPowerShell\ v1 .0\;
  C: \Users\ naomi\.dnx\ bin;
  C: \Program Files\ Microsoft DNX\ Dnvm\;
  C: \Program Files\ Microsoft SQL Server\ 130\ Tools\ Binn\;
  C: \iverilog\ samples &gt; ;
  C: \Program Files(x86)\ Windows Kits\ 8.1\ Windows Performance Toolkit\;
  C: \Program Files\ MySQL\ MySQL Utilities 1.6\;
  C: \Users\ naomi\ Downloads\ php - 5.6 .30 - nts - Win32 - VC11 - x86
  </code></pre>
  
  <p>I looked in the folder php-5.6.30-nts-Win32-VC11-x86 to see if sql is in there too. this is what it gives me php_sqlite3.dll, php_pdo_sqlite.dll </p>
  
  <p>Please help!</p>