title: Internal Server Error when accessing MySQL database via MySQL_Connect
body: <p>Thanks ahead of time for reading my post.</p>
  
  <p>I am getting a 500 Internal Server Error when I successfully access my database via MySQL_Connect. If I put in incorrect credentials for my database I successfully display an error message when I visit my "loginapp.php" file on my site. </p>
  
  <p>I am currently using iPage as a web host.</p>
  
  <p>This is the code in my "loginapp.php"</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
  
  //ob
  ob_start();
  
  //session
  session_start();
  
  //connect
  $error = 'Could not connect to the database';
  mysql_connect('MyDataBase.ipagemysql.com', 'MyBase','MyPass') or die($error);
  mysql__select_db('MyDatabase') or die($error);
  
  //include functions.php phpbb script
  require 'forum/includes/auth/loginuser.php';
  
  ?&gt;
  
  &lt;form action="loginapp.php" method="POST"&gt;
  Username:&lt;br /&gt;
  &lt;input type="text" name="username"&gt;&lt;p /&gt;
  Password:&lt;br /&gt;
  &lt;input type="password" name="password"&gt;&lt;p /&gt;
  &lt;input type="submit" name="login" value="Log in"&gt;
  
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I'm aware that my .htaccess file might somehow be blocking external access to MySQL databases, but I am not very familiar with .htaccess...</p>
  
  <p>I'm pretty sure its not a coding problem, because I only get the 500 error when I put in the correct credentials for my database.</p>
  
  <p>Thanks
  Scott</p>