All pastes #953207 Raw Edit

Untitled

public text v1 · immutable
#953207 ·published 2008-03-22 21:44 UTC
rendered paste body
  function debug() {
  global $connect, $selectdb, $mysql_connect, $mysql_select_db, $clicky;
  // This may not be a very good debugger, but it will do :P
  // Was it the overall connecting to the User and such the problem?
    if(!$connect) {
      echo "There was a problem connecting to MySQL here is some debugging information: <br />
            MySQL Error: ".$mysql_connect."<br />";
      if(!isset($clicky['db_host'])) 
        echo "Your MySQL Host isn't set to anything<br />";
      if(!isset($clicky['db_user'])) 
        echo "Your DB Username is not filled in<br />";
      if(!isset($clicky['db_pass']))
        echo "No MySQL Username password is filled in<br />";  
      echo "Tried all that and this is still appearing? Make sure your password for your username is right, and typed correctly. If this problem presists, contact your host<br />";
    }
    if(!$selectdb) {
      echo "There was a problem selecting your database, here is a bit of information to help you:<br />
            MySQL Error: ".$mysql_select_db."<br />";
      if(!isset($clicky['db_name']))
        echo "You haven't filled in a MySQL DB<br />";
      echo "Tried this and problem still presists? Make sure you have it spelt right.";
      if($connect)
        echo "We also see that you have connected to MySQL but couldn't choose this database, make sure that the user and database are assigned to each other";
    }
  }