Powerpoint presenation and demo of working program

Kunika Saxena Section 002 Travel Website Homework 9 Running Head: TRAVEL WEBSITE CRUD OPERATIONS 1 Table of Contents Website Navigation ................................ ................................ ................................ ................................ ....... 2 Website Issues ................................ ................................ ................................ ................................ ............... 2 Summary about CRUD Operations ................................ ................................ ................................ ............... 2 Debug ................................ ................................ ................................ ................................ .......................... 24 Homework Summary ................................ ................................ ................................ ................................ .. 24 Future Plans ................................ ................................ ................................ ................................ ................ 25 Running Head: TRAVEL WEBSITE CRUD OPERATIONS 2 Website Navigation I have added a folder called config which contains database.php. I have also added the various files that support our CRUD operations. They are create.php, read_one.php, delete.php, and update.php. Website Issues I did not find any issue while implementing the travel website. The implementation went smoothly as depict ed in the next section while showing screenshots of the CRUD operations of the website. Summary about CRUD Operations The website allows creating, reading, updating, deleting of tourist attraction sites from the website. The following screenshot reads all the tourist attraction sites from the database. The page that reads all tourist attraction sites is called attraction sites.php. Running Head: TRAVEL WEBSITE CRUD OPERATIONS 3 You can read, edit, and delete each record by using the respective buttons. The following screenshot shows us adding a new record to the database. We will click on the “Create New Tourist Site” button as shown from the above screenshot. Th e following screenshot shows us a form that will allow us to add a new record. Running Head: TRAVEL WEBSITE CRUD OPERATIONS 4 The following screenshot shows us filling the form with our new record and when we are done, we will click on “Save Site” button. The following screenshot shows that our data has been saved successfully. Running Head: TRAVEL WEBSITE CRUD OPERATIONS 5 The next screenshot shows our data saved in the database. The following screenshot shows us reading one record, the one that I have created. Running Head: TRAVEL WEBSITE CRUD OPERATIONS 6 The next screenshot shows us editing the record that I had created. We will change the country to Netherlands and then show if it is reflected in our database. From the following screenshot we can see that our record has been updated successfully . Running Head: TRAVEL WEBSITE CRUD OPERATIONS 7 The following screenshot shows our record in the database. We can also delete data by clicking the “delete” button depicted in the following screenshot. Running Head: TRAVEL WEBSITE CRUD OPERATIONS 8 After clicking the “Delete” button, we will get a message asking us whether we are you about deleting the record. The following screenshot shows this. Running Head: TRAVEL WEBSITE CRUD OPERATIONS 9 After clicking “OK” the record will be deleted from the database and also removed from the website. Th e following screenshot shows us the success deletion message. From the above screenshot we can also see that the record that had “Netherlands” as a country has been deleted. The following screenshot shows the same from the database. Running Head: TRAVEL WEBSITE CRUD OPERATIONS 10 From the screensh ot above we can see that the record that had “Netherlands” as a country an d an id of 25 has been removed from the database. I added several pages to our website to deal with CRUD operations. The first page is the create.php page. This page helps in creating a single record. It has a form that facilitates the user to create a record. The following screenshot shows the form and th e code. Add a travel site title > Running Head: TRAVEL WEBSITE CRUD OPERATIONS 11 head >
  • < a href ="#" >Colosseum a> li>
  • < a href ="grandcanal.html" >Grand Canal a> li>
  • < a href ="leaningtower.html" >Leaning Tower a> li>
  • < a href ="touristattraction.html" >Tourist Attraction Sites a> li>
  • < a href ="attractionsites.php" >Common Sites a>
  • < a href ="signup.html" >Signup a> li>
  • < a href ="contactme.html" >Contact me a> li> ul> nav > Add tourist attraction site h1 > div > <?php if($_POST ){ include 'config/database.php' ; Running Head: TRAVEL WEBSITE CRUD OPERATIONS 12 try { $query = "INSERT INTO traveltbl SET site =:site , city =:city, country =:country" ; $stmt = $con ->prepare ($query ); // posted values $site =htmlspecialchars (strip_tags ($_POST ['site' ])); $city =htmlspecialchars (strip_tags ($_POST ['city' ])); $country =htmlspecialchars (strip_tags ($_POST ['country' ])); //binding the parameters $stmt ->bindParam (':site' , $site ); $stmt ->bindParam (':city' , $city ); $stmt ->bindParam (':country' , $country ); if($stmt ->execute ()) { echo "Site record was saved successfully." ; }else { echo "Unable to save th e site record." ; } }catch (PDOException $exception ){ die ('ERROR: ' .$exception ->getMessage ()); } } Running Head: TRAVEL WEBSITE CRUD OPERATIONS 13 ?> " method ="post" >
    Attraction Site td> < input type ="text" name ="site" class ="form -control" /> td> tr>
    City td> < input type ="text" name ="city" class ="form -control" /> td> tr>
    Country td> < input type ="text" name ="country" class ="form -control" /> td> tr>
    td> Back to All Sites a> td> tr> table > Running Head: TRAVEL WEBSITE CRUD OPERATIONS 14 form > div >