-
user system help
i have very nearly coded a user system but it says
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/civsea.freehostia.com/config.php on line 28
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/civsea.freehostia.com/memberlist.php on line 15
Can Anybody Help? Pm me please and you get a managment job for fixing mysql problem
bomb-head (forum moderator) - Moved from 'Website Designing' to 'Coding', please post in the correct forum.
-
Post the lines of the error :s
-
Have you set up a MySQL db?
-
-
database
$db_username = 'civsea_calenda';
# database username
$db_password = 'writer1';
# database password
$db_host = mysql2.freehostia.com;
# database host (usually localhost);
$db_database = 'http://www.freehostia.com ';
# database
yes i have setup a database
sorry for double posting, didnt mean it
-
use database host as localhost.
idk otherwise.
-
nope, sorry +rep for trying :D
-
On topic: Cant help sorry ):
Off topic: 8 posts and VIP?
Your very certain!
-
Lmao Piano.
Wish I could help but I'm not a PHP kinda guy.
-
well
-
that error is most likely down to the query you are running against the database, care to post it?
-
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/civsea.freehostia.com/config.php on line 28
<?php
ob_start();
# allows you to use cookies
$db_username = '*****';
# database username
$db_password = '*****';
# database password
$db_host = localhost;
# database host (usually localhost);
$db_database = 'localhost';
# database
$connect = mysql_connect("mysql2.freehostia.com","*****","*** ");
# connect to the database
mysql_select_db("$db_database",$connect);
# select the database
$uname = addslashes($_COOKIE['username']);
# get the username cookie
$pword = addslashes($_COOKIE['password']);
# get the password cookie
$query = "SELECT * FROM `users` WHERE username = '".$uname."' AND password = '".$pword."'";
# set a query
28 $online = mysql_fetch_array(mysql_query($query));
# set an array to get any stored information we want about the browsing user
include ("functions.php");
# include the functions
?>