Forum Moderators: coopster
echo "User: $uname <br/>";
$get_users = "SELECT *
FROM users
WHERE user_name = '$uname'";
echo "Get User: $get_users<br/>";
$get_users_res = mysql_query($get_users, $conn) or die(mysql_error());
echo "GTR $get_users_res <br/>";
$newArray = mysql_fetch_array($get_users_res);
echo "Array: ";
print_r($newArray);
$user_id = $newArray['user_id'];
echo "User ID: $user_id <br/>";
User: msperson1
Get User: SELECT * FROM users WHERE user_name = 'msperson1'
GTR Resource id #5
Array: User ID:
that user name was not found; please go back and try again
For some reason the array is not being returned...
If I remove the trim(), that seems to fix the problem.