View Full Version : user system help
Lee501
26-10-2006, 06:51 PM
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.
RNelson
26-10-2006, 06:52 PM
Post the lines of the error :s
Have you set up a MySQL db?
Lee501
26-10-2006, 06:54 PM
http://civsea.freehostia.com/memberlist.php there is the link
Lee501
26-10-2006, 06:55 PM
$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.
Lee501
26-10-2006, 07:17 PM
nope, sorry +rep for trying :D
Kymux
26-10-2006, 07:55 PM
On topic: Cant help sorry ):
Off topic: 8 posts and VIP?
Your very certain!
AudioBook
26-10-2006, 08:04 PM
Lmao Piano.
Wish I could help but I'm not a PHP kinda guy.
Lee501
26-10-2006, 08:28 PM
thanks anyway guys
dp_124
26-10-2006, 08:57 PM
that error is most likely down to the query you are running against the database, care to post it?
Lee501
27-10-2006, 09:15 AM
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
?>
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.