CODE CREATIVE
STARTING OVER
Grandma's going to be so sad
TASK #1
TASK:
Add another
form
next to the save form.

HINT:
Use the form structure found here to add a form in the appropriate location.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #2
TASK:
Add a submit button that says
reset
whose action goes to
cookie_reset.php
.

HINT:
Add an input of type submit and set the value attribute to "reset" ensuring that text is written on the button. Then, set the
action
attribute of the form to cookie_reset.php.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #3
TASK:
Connect to the database and select the appropriate
table
.

HINT:
You will need to create a set of variables that store the name of the
host
,
user
,
password
, and
database
. Use this data as arguments in the
mysqli_connect
function to connect to the database.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #4
TASK:
Prepare and run the
UPDATE
query setting all the values in the database to
0
.

HINT:
You will need to create a variable to
store
the query and write it according to the example above. After preparing the query, you will need to run the query using the
mysqli_query
function.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #5
TASK:
Use the
header
method to send the program back to the
cookie_clicker
application.

HINT:
You can send the program to an html file by using the header method. Do this to send the program back to
cookie_clicker
after the database transaction is complete.

CHECK UP:
Watch the video below to check that you completed the task.