I am overlooking something... it's one of those duh moments where I have looked to long and cant find it. Can you guys/gals help me?
I have the following lines:
if ($cookie[1] != "") {
$sql = "SELECT name, username, user_email FROM nuke_users WHERE user_id='$cookie[0]'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
if ($row[name] != "") {
$sender_name = $row[name];
} else {
$sender_name = $row[username];
}
$sender_email = $row[user_email];
}
What my problem is, my $send_name will not populate from the $row[username] array. The $row[username] is being populate, I tested that by outputting it to screen.
My sql works since I ran it on the db itself via mysqladmin and it returned the info fine including email and user_id.
I cannot get $row[username] to go into $sender_name no matter what I do ! I put in a test to see with if/else statment its getting into and it's makeing it to the $row[username] but not putting it in the $sender_name.
Any ideas?
Thanks,
Eroc