Jump to content

Recommended Posts

Hello I am trying to fix an error and I am getting the message error I have tried everting I could to do to install it myself and fix it to no avail can someone please help me. the error is:

 

"Warning: mysql_query() [function.mysql-query]: Access denied for user 'xxxxx'@'localhost' (using password: NO) in /home/xxxxx/public_html/xxxxx.COM/index.php on line 6

 

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/xxxxx/public_html/xxxxx.COM/index.php on line 6

Access denied for user 'xxxxx'@'localhost' (using password: NO)"

 

I used to xxxxx's to hide my private info

 

here's the script code

 

<?php

include "conn.php";

include "output.php";

 

$sql = "select * from recipes where picture <> '' and approved='1' order by id desc limit 20";

$rec = mysql_query($sql) or die(mysql_error());

$tr=0;

$bg="#FEE17E";

$datas_array=array();

while($datas=mysql_fetch_array($rec))

{

$datas_array[] = $datas;

}

$body .= outputRecipes($datas_array);

 

 

$curl ="http://" .$_SERVER['HTTP_HOST'];

$rss="$url/rss.php";

$title = "Free tasty recipes - $domain";

$headertitle = "Free Recipes";

$mytemp = "false";

include "template.php";

?>

 

can anyone help any suggestions appreciated!!!! thanks annie

Link to comment
https://forums.phpfreaks.com/topic/273251-i-am-getting-sql-error/
Share on other sites

What's in conn.php?

 

[edit] Assuming there's a mysql_connect() in there, be sure to not post the username you tried to connect with.

And while I'm at it, the error message is telling you that you didn't put the password in. You probably need to.

Edited by requinix
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.