title: Connecting to a specific database using php (xampp / mysql)
body: <p>I want to run a script that successfully connects to a database. I have xampp, both programs running, I have created a database within phpMyAdmin named "testing" with a user login "root" and password "root" (just for this).</p>
  
  <p>The PHP code:</p>
  
  <pre><code>mysql_connect("localhost", "root", "root") or die("&lt;p&gt;failed: " . mysql_error() . "&lt;/p&gt;");
  </code></pre>
  
  <p>I have no idea what is supposed to go into where "localhost" is and can't find an answer. I've tried several different options. Including pointing directly to the damn thing "localhost/xampp/mysql/data/testing".</p>