cookies and sql queries on dash.php