Hello all.

Can someone tell me what I'm doing wrong here?

$sql = "SELECT * FROM user_prefs WHERE u_id='$UserID'";
$result = mysql_db_query($sql);
$color = mysql_fetch_array($result);

echo '
    <table bgcolor="'.$color[color_1].'" class="nav"> ...... ';

I can't get $color[color_1] to return a value. It's in the db and
color_1 is a valid table containing a hex value. This is my first
attempt at using assoc. arrays.

Thanks,

John


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to