chrisgocrazyH
07-01-2008, 04:28 AM
Hello, i've downloaded Habboxtra.net's usersystem and i have edited all configs and every thing.. but im still getting
Access denied for user 'nobody'@'localhost' (using password: NO)
:l help.. (it only shows when i login)
Code:
<?
oB_start();
// allows you to use cookies.
include("config.php");
if (!$logged[username])
{
if (!$_POST[login])
{
echo("
<font face=Verdana style=\"font-size: 8pt\">
<form method=\"POST\">
<p align=\"center\">
<input type=\"text\" name=\"username\" id=\"username\" value=\"Username\" onfocus=\"this.value == 'Username' ? this.value = '' : this.value = this.value\" onblur=\"this.value == '' ? this.value = 'Username' : this.value = this.value\" style=\"width: 140px; height: 22px; font-family:Verdana; font-size:8pt\" size=\"20\" />
<br />
</font><font face=Verdana style=\"font-size: 5pt\">
</font><font face=Verdana style=\"font-size: 8pt\"><br>
<input type=\"password\" name=\"password\" id=\"password\" value=\"Password\" onfocus=\"this.value == 'Password' ? this.value = '' : this.value = this.value\" onblur=\"this.value == '' ? this.value = 'Password' : this.value = this.value\" style=\"width: 140px; height: 22px; font-family:Verdana; font-size:8pt\" size=\"20\" /></font><font size=\"1\" face=Verdana style=\"font-size: 8pt\">
<br />
</font><font face=Verdana style=\"font-size: 5pt\"> </font><font size=\"1\" face=Verdana style=\"font-size: 8pt\"><br>
<input type=\"submit\" name=\"login\" value=\"Login\" size=\"20\" style=\"font-family: Verdana; font-size: 8pt\"></font><br><br><font face=\"Verdana\" style=\"font-size: 8pt\">
<a href='forgotpass.php'>Forgot Pass</a> ||
<a href='register.php'>Register</a></font></p>
</form>");
}
if ($_POST[login]) {
// the form has been submitted. We continue...
$username=$_POST['username'];
$passwordz = $_POST['password'];
$password = md5($passwordz);
// the above lines set variables with the submitted information.
$info = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());
$data = mysql_fetch_array($info);
if($data[password] != $password) {
// the password was not the user's password!
echo "Incorrect username or password!<br><br>
<a href=\"javascript:history.go(-1)\">< Back</a>";
}else{
// the password was right!
$query = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());
$user = mysql_fetch_array($query);
// gets the user's information
setcookie("id", $user[id],time()+(60*60*24*5), "/", "");
setcookie("pass", $user[password],time()+(60*60*24*5), "/", "");
$header = $_SERVER["HTTP_REFERER"];
$header = header("Location: main.php");
// modify the above line...add in your site url instead of yoursite.com
}
}
}
else
{
$new = mysql_query("select * from pmessages where unread = 'unread' and touser = '$logged[username]'");
$new = mysql_num_rows($new);
header("Location: main.php");
}
?>
<body style="background-color: transparent" topmargin="15" leftmargin="0" rightmargin="0" bottommargin="0" link="#000000" vlink="#000000" alink="#000000">MAINS PHP CODE:
<script>
top.location = 'http://habboxtra.net/';
</script>
Thread Closed by brandon (Forum Super Moderator): Due to it being bumped
Access denied for user 'nobody'@'localhost' (using password: NO)
:l help.. (it only shows when i login)
Code:
<?
oB_start();
// allows you to use cookies.
include("config.php");
if (!$logged[username])
{
if (!$_POST[login])
{
echo("
<font face=Verdana style=\"font-size: 8pt\">
<form method=\"POST\">
<p align=\"center\">
<input type=\"text\" name=\"username\" id=\"username\" value=\"Username\" onfocus=\"this.value == 'Username' ? this.value = '' : this.value = this.value\" onblur=\"this.value == '' ? this.value = 'Username' : this.value = this.value\" style=\"width: 140px; height: 22px; font-family:Verdana; font-size:8pt\" size=\"20\" />
<br />
</font><font face=Verdana style=\"font-size: 5pt\">
</font><font face=Verdana style=\"font-size: 8pt\"><br>
<input type=\"password\" name=\"password\" id=\"password\" value=\"Password\" onfocus=\"this.value == 'Password' ? this.value = '' : this.value = this.value\" onblur=\"this.value == '' ? this.value = 'Password' : this.value = this.value\" style=\"width: 140px; height: 22px; font-family:Verdana; font-size:8pt\" size=\"20\" /></font><font size=\"1\" face=Verdana style=\"font-size: 8pt\">
<br />
</font><font face=Verdana style=\"font-size: 5pt\"> </font><font size=\"1\" face=Verdana style=\"font-size: 8pt\"><br>
<input type=\"submit\" name=\"login\" value=\"Login\" size=\"20\" style=\"font-family: Verdana; font-size: 8pt\"></font><br><br><font face=\"Verdana\" style=\"font-size: 8pt\">
<a href='forgotpass.php'>Forgot Pass</a> ||
<a href='register.php'>Register</a></font></p>
</form>");
}
if ($_POST[login]) {
// the form has been submitted. We continue...
$username=$_POST['username'];
$passwordz = $_POST['password'];
$password = md5($passwordz);
// the above lines set variables with the submitted information.
$info = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());
$data = mysql_fetch_array($info);
if($data[password] != $password) {
// the password was not the user's password!
echo "Incorrect username or password!<br><br>
<a href=\"javascript:history.go(-1)\">< Back</a>";
}else{
// the password was right!
$query = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());
$user = mysql_fetch_array($query);
// gets the user's information
setcookie("id", $user[id],time()+(60*60*24*5), "/", "");
setcookie("pass", $user[password],time()+(60*60*24*5), "/", "");
$header = $_SERVER["HTTP_REFERER"];
$header = header("Location: main.php");
// modify the above line...add in your site url instead of yoursite.com
}
}
}
else
{
$new = mysql_query("select * from pmessages where unread = 'unread' and touser = '$logged[username]'");
$new = mysql_num_rows($new);
header("Location: main.php");
}
?>
<body style="background-color: transparent" topmargin="15" leftmargin="0" rightmargin="0" bottommargin="0" link="#000000" vlink="#000000" alink="#000000">MAINS PHP CODE:
<script>
top.location = 'http://habboxtra.net/';
</script>
Thread Closed by brandon (Forum Super Moderator): Due to it being bumped