/* Select User's First Name From Table */ $sql = "SELECT UserFirstName FROM RegisteredMembers WHERE UserID='$_POST[TXT_UserID]'"; $result5 = mysql_query($sql) or die ("couldn't select UserID from database"); $num = mysql_num_rows($result);
/* Welcome Registsred Member */ echo "welcome to the registered members area ";
echo ("$result");
There are a few problems here:
1) Your query result is assigned to $result5 but then you use $result in the mysql_num_rows() function.
2) You never fetch any information. You need something like
$row = mysql_fetch_array($result5).
3) You're trying to print the query result when you should be printing the fetched information like so
echo $row['UserFirstName'];
Hope that helps, Larry
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php