PHP lesson 4

Php chapter 4Download Add_category.php <?php //get the input data// $categoryName=filter_input(INPUT_POST,'category_name'); require_once('database.php'); //add into database// $query = 'INSERT INTO categories (categoryName) VALUES (:categoryName)'; $statement = $db->prepare($query); $statement->bindValue(':categoryName',$categoryName); $statement->execute(); $statement->closeCursor(); //display the…