start to rewrite input.php using xml files to store data, fix syntax bugs of index.php