Using the sources provided you are to add functionality to search for all blogs written before a specific date. The framework for the assignment is set for you user.html                       Contains the HTML to prompt for a date blog_user.php               PHP code to parse the html form and call the function to search by date blog_db_interface.php  PHP code to perform the search You will need to blog_user.php Convert the date to a unix time stamp using strtotime()                         10 points Verify the strtotime return value. On error throw an exception              10 points Convert the unix time stamp to a date and time string using date()       10 points Verify the date functionality. On error throw an exception                      10points If all is OK then call the function to peform the search blog_db_interface.php Implement the SQL query to perform the search and display the results Process errors from calling  “prepare”,  “execute” and “bind_results” All errors should result in an exception thrown                                 10 points Search result should display “Blogger’s name”  “Blog Summary”                  10 points What to turn in (as a single ZIP)

The assignment requires adding functionality to search for all blogs written before a specific date. The framework provided consists of three files: user.html, blog_user.php, and blog_db_interface.php.

In the user.html file, you need to add HTML code that prompts the user for a date. This could be done using a form element with an input field for the date.

In the blog_user.php file, you need to handle the form submission and process the date entered by the user. Firstly, you should convert the date to a Unix timestamp using the strtotime() function. This function converts a human-readable date string to a Unix timestamp. This conversion is important as it allows for easier comparison and manipulation of dates. You should then verify the return value of strtotime(). If an error occurs during the conversion, you should throw an exception.

After successfully converting the date to a Unix timestamp, you need to convert it back to a human-readable date and time string using the date() function. This function takes a format string as its first parameter and the Unix timestamp as its second parameter. You should verify the date functionality and, in case of an error, throw an exception.

If the date conversion steps are successful, you can proceed to call the function that will perform the search. This function should be implemented in the blog_db_interface.php file. In this file, you need to implement the SQL query that will retrieve all blogs written before the specified date. You can use SQL’s WHERE clause to filter the results based on the blog’s date. Make sure to properly handle any errors that may occur during the execution of the SQL query using try-catch blocks. If an error occurs while preparing the query, executing it, or binding the results, you should throw an exception.

The search results should include the blogger’s name and a summary of the blog. You should retrieve this information from the database and display it on the page. The exact format of the search results is not specified, but it should include the necessary information in a readable format.

In the end, you are expected to turn in a single ZIP file containing all the necessary files for running the program. This includes the modified user.html, blog_user.php, and blog_db_interface.php files, as well as any additional files or resources required for the program to work correctly.

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.

Click Here to Make an Order Click Here to Hire a Writer