Results 1 to 5 of 5
  1. #1

    mysql install file problem

    // Basic Configuration
    $title = "CoreTutorial"; // title for all the pages
    // MySQL Information
    $mysql_host = "localhost"; // localhost should be fine
    $mysql_user = "*****"; // mysql username
    $mysql_pass = "*****"; // mysql password
    $mysql_data = "*****"; // mysql database
    $mysql_table = "_13beta"; // your mysql table prefix. leave as is if this is a new install.
    $mysql_table_users = "_13betauser"; // do not edit
    // do not edit below!
    mysql_connect($mysql_host,$mysql_user,$mysql_pass) or die("Error connecting to Database! Please Try again.
    " . mysql_error());
    mysql_select_db($mysql_data) or die("Cannot select database! Please Try again.
    " . mysql_error());
    // Administration Information
             // Administration MySQL - DO NOT EDIT!
    header("Cache-control: private"); //IE 6 fix
    $db_conn = mysql_connect("$mysql_host", "$mysql_user", "$mysql_pass") or die("unable to connect to the database");
      mysql_select_db("$msql_data", $db_conn) or die("unable to select the database");
            // Enter the email address you want for the forgot password form. This email
            // adress will appear in the From column in the email. (eg: [email protected])
    $from = [email protected]';

    Okay, for some reason it can't select the database even though the database, username, and password are right.

    I might of accidentally deleted part of the code while I was editing it, but I was stupid enough not to save the original file.

    So, what the code is supposed to do is:

    Connect to MySQL
    Install MySQL
    If it didn't work display an error ("cannot select database")
    If it did work display something like : Sucess! The mysql tables have been installed!

  2. #2
    Join Date
    Jan 2004
    Denver, CO
    Do you receive any error messages ? Posting them would be helpful.

  3. #3
    No, well, no PHP errors. Just the message "unable to select the database".

  4. #4
    Join Date
    Jul 2005
    It seems that you have a typo in line:

    mysql_select_db("$msql_data", $db_conn) or die("unable to select the database");

    From what was defined eariler, it probably should be "$mysql_data" - not "$msql_data"

  5. #5
    oh, that might help.. thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts