Hello
1- you're not catching right the posted variables this way,you have to quote the var name,so fix it to become like this:
php
$_POST['day']
2- you're opening the file and close it right away, so that's doesn't make sense. and i think you don't need this part
QUOTE
$fh = fopen($myFile, 'w');
fclose($fh);
3- variable's names are case sensitive in php, so replace $myfile with $myFile
QUOTE
$fh1 = fopen($myfile, 'a');
4- what is $file here ,you didn't define it.
QUOTE
$handle = @fopen($file, 'r');
5- you write to the wrong file handler $fh is already closed,so you may need to change it to $fh1
QUOTE
fwrite($fh, $stringData);
fclose($fh);
Well after all I think that code will not give you what you want
I'm in rush now maybe i can take a look at it later or some other members can help you fix the code
Good Luck