PHP chapter 7

lesson 7Download index.html <!DOCTYPE html> <html> <head> <title>Account Sign Up</title> <link rel="stylesheet" href="main.css"/> </head> <body> <main> <h1>Account Sign Up</h1> <form action="display_results.php" method="post"> <fieldset> <legend>Account Information</legend> <label>E-Mail:</label> <input type="text" name="email" value=""…

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…

Php lesson 2

display_discountDownload <?php //Get the infromation from the form// $product_description = filter_input(INPUT_POST,'product_description'); $list_price = filter_input(INPUT_POST,'list_price'); $discount_percent = filter_input(INPUT_POST,'discount_percent'); $discount_amount = $list_price * $discount_percent *.01; $discount_price = $list_price - $discount_amount; //formating the…