title: Having Problems With PHP Connection
body: <p>This is the code that connects to my SQL database. I'm new with this stuff and it seems to be semi-working but certain features on my website still don't work. </p>
  
  <pre><code>&lt;?php
  $con = mysql_connect("localhost","username","password");
  $select_db = mysql_select_db('database1',$con);
  /*$con = mysql_connect("localhost","username2","password2");
  $select_db = mysql_select_db('database2',$con);*/
  ?&gt;
  </code></pre>
  
  <p>This is the site in question: <a href="http://tmatube.com" rel="nofollow">http://tmatube.com</a> keep in mind the credentials above are filled in with what the programmer used for testing on his own server... ;) unfortunately I don't have access to him for support anymore.</p>
  
  <p>Anyway, here's my thoughts on how this code needs to be edited maybe someone can chime in and let me know if I'm correct in my assumptions:</p>
  
  <pre><code>&lt;?php
  $con = mysql_connect("localhost","username1","password1"); -------------&lt;&lt;&lt; leave this line 
  $select_db = mysql_select_db('DATABASE_NAME_HERE',$con);
  /*$con = mysql_connect("localhost","DB_USERNAME_HERE","DB_PASSWORD_HERE");
  $select_db = mysql_select_db('DATABASE_NAME_HERE',$con);*/
  ?&gt;
  </code></pre>
  
  <p>Ok - now on to a few problems I noticed...</p>
  
  <p>What does this do? /* code here */? It doesn't work at all if I leave that bit in. </p>
  
  <p>Why is it connecting to database twice? and is it two separate databases? </p>
  
  <pre><code>$select_db = mysql_select_db('DATABASE_NAME_HERE',$con); &lt;&lt;&lt;---- single '
  </code></pre>
  
  <p>When I tried to see if that line was correct the examples I saw had quotes like this</p>
  
  <pre><code>$select_db = mysql_select_db("DATABASE_NAME_HERE",$con); &lt;&lt;&lt;---- double "
  </code></pre>
  
  <p>Which one is right?</p>