Query distinct then select option then choose and query choosed as html result on page
I manage to solve the problem, here is the code for others who need help.

$sid=$_GET['month'];
$sql = "SELECT * FROM diary where user_name = '$login_session' 
    and month= '$sid' ORDER BY day";
$result = mysql_query($sql);
while ($rs=mysql_fetch_object($result)){


and then just wrap in tables:

echo $rs-&gt;day;
echo $rs-&gt;post;
}