tinytinker
New Member
- Messages
- 10
- Reaction score
- 0
- Points
- 0
ok im sorry for such a repetative subject on here but
Basically this is my db_connect.php
However when i enter this in i get the following error
The stars are just my ID & Password.
my user names and db names are all cppanelname_loginname and cppanel_dbname
I cant see where i have gone wrong, i havent had a problem like this before
I get the same errors on this file also
the above was part of an addon i did for teamspeak. It used to work fine when i hosted my website from home but now as i have a dynamic ip and a slower connection i decided to remotely host everything, Any help would be greatly appreciated.
Thanks
Basically this is my db_connect.php
Code:
<?php
$database[dbserver]="localhost";
$database[dbuser]="********_tiny ";
$database[dbname]="********_tiny";
$database[dbpass]="***********";
$table ="table1";
$connect = mysql_connect($database['dbserver'], $database['dbuser'], $database['dbpass']);
?>
However when i enter this in i get the following error
Code:
[B]Warning[/B]: mysql_connect() [[URL="http://www.idai.exofire.net/function.mysql-connect"]function.mysql-connect[/URL]]: Access denied for user '********_tiny'@'localhost' (using password: YES) in [B]/home/********/public_html/db_connect.php[/B] on line [B]9[/B]
The stars are just my ID & Password.
my user names and db names are all cppanelname_loginname and cppanel_dbname
I cant see where i have gone wrong, i havent had a problem like this before
I get the same errors on this file also
Code:
<?php
/*
*/
//Database Information
// Edit these Parts for your site
$dbhost = "localhost";
$dbname = "";
$dbuser = "";
$dbpass = "";
//Connect to database
mysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());
mysql_select_db($dbname) or die(mysql_error());
$s_client_name = $_POST['s_client_name'];
$s_client_password = $_POST['s_client_password'];
$email = $_POST['email'];
$checkuser = mysql_query("SELECT s_client_name FROM ts2_clients WHERE s_client_name='$s_client_name'");
$s_client_name_exist = mysql_num_rows($checkuser);
if($s_client_name_exist > 0){
echo "I'm sorry but the username you specified has already been taken. Please pick another one.";
unset($s_client_name);
include 'index.php';
exit();
}
$query = "INSERT INTO ts2_clients (s_client_name, s_client_password, i_client_server_id, b_client_privilege_serveradmin)
VALUES('$s_client_name', '$s_client_password', '0', '0')";
mysql_query($query) or die(mysql_error());
mysql_close();
echo "You have successfully Registered to Evolution";
/* Edit these details to fit your site and details */
$yoursite = ' www.idai.exofire.net ';
$webmaster = ' Evolution ' ;
$youremail = ' admin@idai.exofire.net ';
$subject = "You have successfully registered at $yoursite...";
$message = "Dear $s_client_name, you are now registered at our web site.
To login, simply go to our web page and enter in the following details in the login form:
Username: $s_client_name
Password: $s_client_password
Please print this information out and store it for future reference.
Thanks,
$webmaster";
mail($email, $subject, $message, "From: $yoursite <$youremail>\nX-Mailer:PHP/" . phpversion());
echo "Your information has been mailed to your email address.";
?>
the above was part of an addon i did for teamspeak. It used to work fine when i hosted my website from home but now as i have a dynamic ip and a slower connection i decided to remotely host everything, Any help would be greatly appreciated.
Thanks