some change in function and add form.php(realy need?) delete dublicate function last()