"; } else { $your_name=$_POST[your_name]; $your_name=stripslashes($your_name); $your_phone=$_POST[your_phone]; $your_address=$_POST[your_address]; $your_birthday=$_POST[your_birthday]; $your_salary=$_POST[your_salary]; $filename="datebook.master"; if(!file_exists($filename)) { print "No such file or directory"; exit(); } $fh=fopen($filename,"a"); $outstring="$your_name:$your_phone:$your_address:$your_birthday:$your_salary
"; if(fwrite($fh,$outstring,strlen($outstring))==FALSE) { echo "You cannot write to the $filename.
"; } else { $text=file_get_contents("$filename"); echo "
$text
"; } echo "Sort $filename file
"; $lines = file($filename); trim($lines); asort($lines); foreach ($lines as $key => $val) { echo "$val
"; } fclose($fh); } } else{ ?> Self-processing PHP script

Please enter your name:

Please enter your phone:

Please enter your address:

Please enter your birthday:

Please enter your salary: