Welcome to WebmasterWorld Guest from 23.22.46.195

Forum Moderators: coopster & jatar k

Problems with external mysql connect()?

   
2:13 am on Jan 27, 2008 (gmt 0)

5+ Year Member



Hey there im trying to connect to my db through an external 'include' file but it keeps giving me this error?

Warning: mysql_query() [function.mysql-query]: Access denied for user 'user'@'localhost' (using password: NO) in /home/rickyb/public_html/styles/profile.php on line 3

This is my code:
<?php require("http://www.example.com/styles/connect.php");?>
<?php
///// converting Username to a valuble, This cannot be changed
$placeholders = array("{username}");
$username = $placeholders[0];
?>
<?php require("http://www.example.com/styles/profile.php");?>

In the connect.php it has all the db and connection information and in the profile.php it has my <html> bla bla , mysql_close(connect)</html>, but it keeps giving me an error when i do it this way?

Any ideas would be much appreciated :):):)
Thanks again
Ricky

[edited by: eelixduppy at 3:08 am (utc) on Jan. 27, 2008]
[edit reason] example.com [/edit]

7:16 am on Jan 27, 2008 (gmt 0)

5+ Year Member



Warning: mysql_query() [function.mysql-query]: Access denied for user 'user'@'localhost' (using password: NO) in /home/rickyb/public_html/styles/profile.php on line 3

as the error message points you supplied wrong password to the mysql_connect function so check your password.

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month