homepage Welcome to WebmasterWorld Guest from 54.204.90.135
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Problems with external mysql connect()?
ToxinMan




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

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]

 

Mohamed




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved