Question
Here is your homework assignment Create a webpage that counts the number of times the page loads. First, create a new table called pagecounter with
Here is your homework assignment Create a webpage that counts the number of times the page loads. First, create a new table called pagecounter with 2 integer fields, 'id' and 'count'. Give the count field an initial value of 0. So this table will have one single record. The pagecounter table should look like this Next, create a PHP page that increases the value of the count field by 1 using an update query. Then print the value of the count field onto the page. So every time you refresh, the value will be increased by 1. The code to UPDATE an existing record is simple. Create a query to update the count field. Google "SQL update query" to see examples. You should do this using less than 12 lines of PHP code. I did it in 8 lines (not including comments).
Use any CSS template you want, or create your own.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started