query( "UPDATE " . USERPREFIX . "_users set favorites='$favorites' where user_id = '$member_id[user_id]'" );
}
$buffer = "";
} elseif( $_REQUEST['action'] == "minus" ) {
$list = explode( ",", $member_id['favorites'] );
$i = 0;
foreach ( $list as $daten ) {if( $daten == $id ) unset( $list[$i] ); $i ++;}
if( count( $list ) ) $member_id['favorites'] = $db->safesql(implode( ",", $list )); else $member_id['favorites'] = "";
$db->query( "UPDATE " . USERPREFIX . "_users set favorites='$member_id[favorites]' where user_id = '$member_id[user_id]'" );
$buffer = "";
} else die( "error" );
$db->close();
@header( "Content-type: text/html; charset=" . $config['charset'] );
echo $buffer;
?>