Also, where do you connect to the database? Even if its in one of your includes, btw, you have to call the connection with each mysql query.
Eg: mysql_query($query, $con)or die(mysql_error());
with $con being the connection variable
EDIT: also, its good to know that unless your using indexed results, use mysql_fetch_assoc instead of fetching an array. Its faster.