Log in

View Full Version : Php problem



Rafiki
27-03-2008, 08:58 PM
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/icehabbo/public_html/index.php on line 11


<?
$host = "localhost";
$dbuser = "icehabbo_Usersystem";
$dbpwd = "*removed*";
$db = "icehabbo_Usersystem";
$connect = mysql_pconnect($host, $dbuser, $dbpwd);
if(!$connect) {
echo("Could not connect to database...");
} else {
$select = mysql_select_db($db);
}
?>

Bojangles
27-03-2008, 08:59 PM
Make sure you added your user to the database in mySQL databases :)

Rafiki
27-03-2008, 09:01 PM
I have :S

Bojangles
27-03-2008, 09:08 PM
Did you make sure you created a database?
EDIT: Your also forgetting to add <?PHP :P

<?php
$dbhost = 'localhost';
$dbuser = 'fbdfgfbdn';
$dbpass = 'ngfngfnf';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error try again lulz);

$dbname = 'nameofdb here';
mysql_select_db($dbname);
?>

Try that :)
You were also using wrong codes ;)

Dentafrice
27-03-2008, 09:12 PM
Why don't you show use line 11?

Just showing us your configuration file isn't going to help. From what I can see there is not a mysql_fetch_array on that page :)

Bojangles
27-03-2008, 09:14 PM
O.o silly error :)

Independent
27-03-2008, 09:19 PM
He's got no chance of installing it correctly LOL

Bojangles
27-03-2008, 09:21 PM
Show us line 11

Independent
27-03-2008, 09:22 PM
By that he means

Press down 10 time's, then copy and paste it here.

Bojangles
27-03-2008, 09:29 PM
And in the index.php file :)

Bojangles
27-03-2008, 09:31 PM
<div align="center"><form method="post" action="index.php?login=login">

It's not being directed to the panel :P

Independent
27-03-2008, 09:33 PM
<div align="center"><form method="post" action="index.php?login=login">

It's not being directed to the panel :P
Didn't housekeeping v1 use ?login=login

I'm guessing craig used that code from housekeeping, seeing as he wasn't that good at coding when he made it

Bojangles
27-03-2008, 09:34 PM
Didn't housekeeping v1 use ?login=login

I'm guessing craig used that code from housekeeping, seeing as he wasn't that good at coding when he made it
Think so, but shouldnt it direct him to login.php? :S

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