Small problem, Please help...
Posted: Sun Feb 29, 2004 1:26 pm
Recently I have been developing a new login system for my site. Now I have a problem that I just can't seem to solve. The problem is when a user logs in successfully I am trying to make it so it shows how many points they currently have. The code go's like:
$link = mysql_connect("???", "???", "???");
$activate = mysql_db_query ("???", "SELECT * FROM members WHERE username = '$username' AND password = '$password'");
$points1 = mysql_db_query ("???", "SELECT points from members WHERE username = '$username' AND password = '$password'");
if ($result = mysql_fetch_row($activate))
{
echo "<b>Welcome " . $username . " You currently have ". mysql_fetch_row($points1) . " points!</b><p>";
mysql_close($link);
}
Thats obviously just some of the code but can someone please help me. Another thing i should mention is when the user does login it says:
Welcome Joe You currently have Array points.
When it should actually say:
Welcome Joe You currently have 200 points.
Regards!
Joe
$link = mysql_connect("???", "???", "???");
$activate = mysql_db_query ("???", "SELECT * FROM members WHERE username = '$username' AND password = '$password'");
$points1 = mysql_db_query ("???", "SELECT points from members WHERE username = '$username' AND password = '$password'");
if ($result = mysql_fetch_row($activate))
{
echo "<b>Welcome " . $username . " You currently have ". mysql_fetch_row($points1) . " points!</b><p>";
mysql_close($link);
}
Thats obviously just some of the code but can someone please help me. Another thing i should mention is when the user does login it says:
Welcome Joe You currently have Array points.
When it should actually say:
Welcome Joe You currently have 200 points.
Regards!
Joe