PDA

View Full Version : mySQL problem



:job2
27-06-2007, 05:21 PM
well the error message im getting can be seen on www.hhgs.net/showrares.php (http://www.hhgs.net/showrares.php) i dont know anything about code realy so dont know what to do. The php file its getting the error from says the following...


<?php
/* Project Rare Value Professional */
/* Functions file (for logging in and displaying your values */
/* INCLUDES LICENSE KEY SYSTEM - WILL NOT FUNCTION UNLESS YOU HAVE GIVEN config.inc.php A LICENSE KEY */
require("config.inc.php");
function licenseCheck($license_key) {
$to_get = "http://uploadz.co.uk/values/license.php?ip=";
$to_get .= $_SERVER['SERVER_ADDR'];
$to_get .= "&key=";
$to_get .= $license_key;
$license = file_get_contents($to_get);
if ($license == "false") {
die("<strong>YOUR PANEL LICENSE KEY IS INVALID, OR THE IP REGISTERED TO YOUR KEY IS INCORRECT!</strong>");
}
}
licenseCheck($license_key);
/* require("phplock.inc.php");
if ($license_key == "") {
die("Please input a license key into config.inc.php");
}
if (!phpLock($license_key) {
die("THEIR IS EITHER A LICENSING ERROR, OR YOU ARE ATTEMPTING TO PIRATE TO SOFTWARE. IF THIS IS AN ERROR, PLEASE CONTACT [email protected]");
} */
/* Connect to the MySQL server and select the database */
$connection = mysql_connect(localhost, hhgsnet_rares, g35GFDgw5r52) or die(mysql_error());
mysql_select_db(hhgsnet_rvsystem) or die(mysql_error());
/* Connection complete */
/* Login functions */
function login($username, $password) {
$checklogin = mysql_query("SELECT * FROM users WHERE name='" . $username . "' and password='" . $password . "'");

if (mysql_num_rows($checklogin) < 1) {
die('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Bobboid Rare Values</title>
<style type="text/css">
<!--
body {
background-color: #6699FF;
margin-top: 10px;
}
#main {
margin-left: auto;
width: 500px;
background-color: #FFFFFF;
margin-right: auto;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
padding: 0px;
padding-bottom: 3px;
padding-top: 0px;
}
-->
</style></head>
<body>
<div id="main">
<p><img src="banner.png" alt="HHGS Values" width="500" height="175" /></p>
<p align="center"><strong>Welcome to the HHGS.net Values!</strong><br />
<em>The login details you provided were incorrect. Please try to login again:</em></p>
<form id="form1" name="form1" method="post" action="login.php">
<label>
<div align="center">Username
<input name="username" type="text" id="username" />
<br />
Password
<input name="password" type="password" id="password" />
</div>
</label>
<p align="center">
<input type="submit" name="Submit" value="Login" />
</p>
</form>
<p align="center"><em>Powered by HHGS</em></p>
</div>
</body>
</html>
'); }
elseif (mysql_num_rows($checklogin) > 0) {
setcookie("hhgsvalues_login", $username . "|..|" . $password);
header("Location: admin_home.php");
}
}
function checkLogin($username, $password) {
$checklogin = mysql_query("SELECT * FROM `users` WHERE `name` = '" . $username . "' AND `password` = '" . $password . "'");

if (mysql_num_rows($checklogin) < 1) {
die('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>HHGS Rare Values</title>
<style type="text/css">
<!--
body {
background-color: #6699FF;
margin-top: 10px;
}
#main {
margin-left: auto;
width: 500px;
background-color: #FFFFFF;
margin-right: auto;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
padding: 0px;
padding-bottom: 3px;
padding-top: 0px;
}
-->
</style></head>
<body>
<div id="main">
<p><img src="banner.png" alt="HHGS Values" width="500" height="175" /></p>
<p align="center"><strong>Welcome to the HHGS.net Values!</strong><br />
<em>The login details you provided were incorrect. Please try to login again:</em></p>
<form id="form1" name="form1" method="post" action="login.php">
<label>
<div align="center">Username
<input name="username" type="text" id="username" />
<br />
Password
<input name="password" type="password" id="password" />
</div>
</label>
<p align="center">
<input type="submit" name="Submit" value="Login" />
</p>
</form>
<p align="center"><em>Powered by HHGS.net</em></p>
</div>
</body>
</html>'); }
}
/* End login functions */
function getRank($username, $password) {
$getRank = mysql_query("SELECT * FROM `users` WHERE `name` = '" . $username . "' AND `password` = '" . $password . "'");
while ($rows = mysql_fetch_array($getRank)) {
$rank = $rows['rank'];
return $rank;
}
}
function displayRares($type, $limit) {
$raresQuery = mysql_query("SELECT * FROM `rares` WHERE type='$type' LIMIT $limit");
while ($rows = mysql_fetch_array($raresQuery)) {
echo "<div class=\"rare\">";
if (!empty($rows['url'])) { echo("<img src=\"" . $rows['url'] . "\" alt=\"" . $rows['name'] . "\" name=\"" . $rows['name'] . "\"/>"); }
echo "<br />";
if (!empty($rows['name'])) { echo($rows['name']); }
echo "<br />";
if (!empty($rows['t'])) { echo($rows['t']."T "); }
if (!empty($rows['hc'])) { echo($rows['hc']."HC "); }
if (!empty($rows['rd'])) { echo($rows['rd']."RD "); }
echo "</div>
";
}
}
?>


Moved by opensourcehost (Forum Moderator) from Programming: Please post in the correct forum next time, thanks http://habboxforum.com/images/smilies/smile.gif.

Wiley
27-06-2007, 10:11 PM
Problem is wrong with the liscence?

:job2
28-06-2007, 07:28 AM
I dont know i just got told to upload showrares.php and functions.inc.php and it would work, but it hasnt so now i dont know what to do

Want to hide these adverts? Register an account for free!