I'm trying to build a simple web application with two parts.
Part A: User gets a link. On that link, there is just one button. When he clicks that button, three things should happen:
1) He downloads a file from a server. 2) Run a php script that will save the time of the download to a database (for that user). 3) Redirect to another page -> Part B
Part B: On the second page, there are two buttons. Browse button to select file from the disk. Upload button to upload the file to the server. There are again three things to this part.
1) File is uploaded and saved on the server. 2) The time of the upload is inserted into database (for that user). 3) If the user tries to open the link (from part A), he is automatically redirected to part B. So there is no way to get to the part A download the file again.
Extra part: 1) I would like to have a timer that measures time that passed since the file was downloaded. This timer will be displayed on the page B, updates every second. 2) If possible, this timer will disable upload option (let's say after 120 minutes). 2) Should I be concerned about security (https)?
I am beginner in PHP. From what I read I would have to combine both JS and PHP, to make this work. Is that correct? How would you build this app?
EDIT - SOLUTION:
I have the solution. Wanted to post it here, but it is way too long. In case you are interested, you can PM me and I will send it to you.