Jump to content

4 Errors :/


xyn

Recommended Posts

Hey,
I have got hese four errors I don't know how to fix them.

[color=purple]Warning: mysql_query(): Access denied for user 'nobody'@'localhost' (using password: NO) in en/includes/tools.php on line 4

Warning: mysql_query(): A link to the server could not be established in en/includes/tools.php on line 4

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in en/includes/tools.php on line 5[/color]

tools.php

Line 4:
$sql = mysql_query("SELECT usr_rank FROM accounts WHERE usr_user='{$_SESSION['user']['usr_user']}'");

Line 5 & 6:
while( $data = mysql_fetch_array($sql))
{
entire code:
[code=php:0]<?PHP
include("config.php");
include("".$INFO['SITE_URL']."/en/db/db.php");
$sql = mysql_query("SELECT usr_rank FROM accounts WHERE usr_user='{$_SESSION['user']['usr_user']}'");
while( $data = mysql_fetch_array($sql))
{
$rank = $data[0];
}

if($_SESSION['EumodUK'] != true)
{
//tool is not set.
exit;
}
else
{

if( $rank == "admin" )
{
$tools = 'tools';
exit;
}
elseif( $rank == "mod" )
{
$tools = 'tools here';
exit;
}
else
{
$login='';
exit;
}

}

?>[/code]
Link to comment
Share on other sites

Yeah, I used that same db.php file and directory for the registering and logging in etc. works fine...

basically I have a folder called en,
includes/ = dir.
db/ = dir
ezone/ = dir
and I have used include from ezone/pages.php => ../db/db.php works fine...
just that one doesn't :/
Link to comment
Share on other sites

also if i change the include to ../db/db.php i get:
Warning: main(../db/db.php): failed to open stream: No such file or directory in /en/includes/tools.php on line 3

Warning: main(): Failed opening '../db/db.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /en/includes/tools.php on line 3

Warning: mysql_query(): Access denied for user 'nobody'@'localhost' (using password: NO) in /en/includes/tools.php on line 4

Warning: mysql_query(): A link to the server could not be established in en/includes/tools.php on line 4

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /en/includes/tools.php on line 5
Link to comment
Share on other sites

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.