Define variables for storing library information like the name, address, and total number of books.
Define constants for library open and close times.
Use variables and constants appropriately throughout the application.
HTML with PHP
Create an HTML form to add a new book. The form should collect the book's title, author, genre, and publication year.
Create an HTML form to search for books by title or author.
Display Errors in PHP
Implement error handling to display errors when the form is submitted with missing or incorrect data.
Ensure that user-friendly error messages are displayed.
Data Types
Use different data types for various information. For example, strings for names, integers for numbers, and arrays for storing multiple books.
Operators
Use arithmetic operators to calculate the total number of books.
Use assignment operators to assign values to variables.
Implement increment and decrement operators to update the number of available books.
Use string operators to concatenate book details.
Conditional Statements
Use if and else conditions to check if the library is open or closed based on the current time.
Use else if to provide additional checks for special events or holidays.
Use a switch statement to categorize books by genre.
Logical Operators
Use logical operators to combine multiple conditions for complex checks, such as verifying if a book is available and the library is open.
Loops
Use loops to display the list of all books in the library.
Use loops to search for a book by title or author.
Ternary Operator
Use the ternary operator to simplify conditional statements, such as setting a default message if no books are found.
Null Coalescing Operator
Use the null coalescing operator to handle cases where optional form fields may be left empty.
PHP Assignment Variables and Constants
HTML with PHP
Display Errors in PHP
Data Types
Operators
Conditional Statements
Logical Operators
Loops
Ternary Operator
Null Coalescing Operator
Deadline:- 6 july 7pm