tinytinker
New Member
- Messages
- 10
- Reaction score
- 0
- Points
- 0
Can anyone lend a hand at all?
I have the intermediate php (Version 2?)
The mysql server is localhost i assume...
Error i get is
Line 9 of db_connect is the last line of code (my complete db_connect is below)
DB Connect
I enter my db user and db name in the normal way of "CPPANELNAME_USER" & "CPPANELNAME_DBNAME"
The code i use on registration page to embed this is
i cannot see anywhere i have gone wrong :/ could someone give me any pointers
(my php isnt that great so if i am wrong with anything i appologise)
I have the intermediate php (Version 2?)
The mysql server is localhost i assume...
Error i get is
Code:
[B]Warning[/B]: mysql_connect() [[URL="http://forums.x10hosting.com/function.mysql-connect"]function.mysql-connect[/URL]]: Access denied for user 'tinytink_tiny'@'localhost' (using password: YES) in [B]/home/tinytink/public_html/db_connect.php[/B] on line [B]9[/B]
Line 9 of db_connect is the last line of code (my complete db_connect is below)
Code:
$connect = mysql_connect($database['dbserver'], $database['dbuser'], $database['dbpass']);
DB Connect
I enter my db user and db name in the normal way of "CPPANELNAME_USER" & "CPPANELNAME_DBNAME"
Code:
<?php
$database[dbserver]="localhost";
$database[dbuser]="";
$database[dbname]="";
$database[dbpass]="";
$connect = mysql_connect($database['dbserver'], $database['dbuser'], $database['dbpass']);
?>
The code i use on registration page to embed this is
Code:
<?
Include("header.php");
require_once($_SERVER['DOCUMENT_ROOT'].'/db_connect.php');
?>
i cannot see anywhere i have gone wrong :/ could someone give me any pointers
(my php isnt that great so if i am wrong with anything i appologise)