for simplicity lets rework your query so you only need one while loop.
sql = "SELECT shop_id, area_id, shop_name, area_name
FROM tblshops, tblareas
where tblshops.area_id = tblareas.area_id
order by shop_name, area_name
$areas = mysql_query(sql);
now loop through and build your select which looks fine.
Does this fix the problem or you having problems reading them back in again?