the requirement for system is actually like this:
1.the initial value of the "browse" flag is "0", when user click the "browse" button,
the flag of the browse button should be "1" and system would post and save the all the task details
into database and $Task_ID would be created for the Task.(Task_ID is auto_incremented)
2.Then user select file and click "send file" button, the system will upload the selected file and
copy into the specified folder and also attach it to the $Task_ID.
3.Then user click the "submit" button, system should check the browse flag,
[INDENT] if "1", system will go to other page and display previous task details and also the attachment.[/INDENT]
[INDENT]if the flag "0", this means that the task has no attachment and the system will save all the task details
then go to other page and display the previous task details that has no attachment.[/INDENT]
3.If user has already click "browse" button and "send file", then the user decided to cancel the task ,
or click anywhere except "cancel" button, system will check for the "browse" flag ,
[INDENT]if "1", system will prompt(push) user to click "cancel" button. Once user has click the "cancel" button,
the system will delete the task according to $Task_ID and clear the page.
[/INDENT]
[INDENT]
if "0" the page will be refreshed.[/INDENT]
4.For the "Reset" button,I guess the function is the same with "cancel" button.so there is no need
to include "Reset" button.