<!-- On submit, the script register.php is called, which adds a new entry for the user in the database and creates a table (with his userName) for his tasks.-->
<divclass='form'>
<formclass ='form-group'style='text-align:center; margin-top: 35px'action="./php/register.php"method="post"><!--On every key press call the matchPass function from the passwordMatch script -->
<labelclass="form-control-label"> User Name :</label><spanid="suggest"></span>
<inputtype="text"name="userName"id ="userName"onkeyup="searchUser()"> <br><!-- on every key press, it uses the search user function in the script to see if username is availble. -->
<inputtype="password"name="pass1"id="pass1"onkeyup="matchPass()"required> <spanid="match1"></span><br><!-- On every key press it checks the 2 password fields for matches. -->
<br><inputclass="btn btn-success"type="submit"name="submit"value="submit"id ="submit"disabled><!-- If username is available and both passwords match, the submit button is enabled. -->
* if userName is present (meaning user is logged in), it executes the script serveData which returns a $taskArray global variable containing task objects.
* Then this task Array rendered with twig for the view.html where the appropriate values are input into the templates.
*
* else it renders view.html with tasks as null, which urges the user to log in.