Question: 3. [20 pts] PHP This question is a continuation of question 2., but from the server side. a) Write a PHP snippet that extracts the

3. [20 pts] PHP

This question is a continuation of question 2., but from the server side. a) Write a PHP snippet that extracts the two dates from the incoming data and store them in variables $date1 and $date2.

b) Create an array called $dates and fill it with 5 random dates in the range between $date1 and $date2 inclusive. The dates must be valid!! Hint #1: Recall that to get random integer numbers in the range [x,y] use predefined function mt_rand(x,y); Hint #2: If you are thinking that this problem does not need timestamps, you are wrong. Think again.

c) Write a PHP snippet that creates a table of the 5 random dates you have generated. Hint: date("d/m/Y", $ts); will be helpful.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!