Hi,

Set up DB, sql file. Looks ok.

Get

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'a2108135'@'localhost' (using password: NO) in /home/a2108135/public_html/connect.php on line 27

Line 26-27

$dblink=MYSQL_CONNECT($MySqlHostname, $MySqlUsername, $MySqlPassword) or die("Could not connect to database");
    @mysql_select_db("$MySqlDatabase") or die( "Could not select database");

Any help, thanks!!!

L-D

Make sure your username is correct, since the warning says "Access denied"

Make sure that the username has access from the IP from where you want to connect to the server.

Is localhost your server or a remote one ?

Hi and thanks!!

Make sure your username is correct, since the warning says "Access denied"
seems to be ok.

It's localhost.

Make sure that username has access from the IP
I'm cluless.

Well, now I get:
Parse error: syntax error, unexpected T_IF in /home/adven735/public_html/connect.php on line 14

(connect.php note line 14)

<?php

$mysql_host = "localhost";
$mysql_database = "adven735_myblackcat";
$mysql_user = "adven735_mycat";
$mysql_password = "5d(KXU3g,.}H";

x

// do not edit below this line!!     
///////////////////////////////////////////////////////////////////////

    /// Register Gloab Emulation
Line 14>>>   if (!ini_get('register_globals')) {
        $superglobals = array($_SERVER, $_ENV,
                $_FILES, $_COOKIE, $_POST, $_GET);
        if (isset($_SESSION)) {
            array_unshift($superglobals, $_SESSION);
        }
        foreach ($superglobals as $superglobal) {
            extract($superglobal, EXTR_SKIP);
        }
    }



    $dblink=MYSQL_CONNECT($MySqlHostname, $MySqlUsername, $MySqlPassword) or die("Could not connect to database");
    @mysql_select_db("$MySqlDatabase") or die( "Could not select database");


?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.