Starting from:
$35

$29

Week 2 - Thursday PHP assignment Solution

Overview:




Create a combination Web 1.0 solution to display information from the key/value database you just worked on.




Directions:




Create a directory called Display under your repository at the top level.



Copy over the week2 files from my public git repository to this directory. By the way, there is a solution to the Tuesday lab in that public git.



So you should now see in your Display directory files that include:



info.php - this contains the model code for accessing the database



week2-rest.php - the rest server for handling the ajax based calls



createAndTestInfo.php - a script that will create the needed database and table as well as insert some test data



You will need to create a password.php file that is used by the info.php



$user



$pass



$db



$addPass - this is the string the model uses to protect add functions.



please use the string "password" so I can test your program.



Also create a .gitignore file at the root of your repository. In this file you will place the string "password.php" so that the password file is never commited to GIT.



make sure to do the "git add .gitignore" so the .gitignore is added to your repository. I never want to see the password.php file in your central repository.



Create an index.php file that will call the info.php model and will create and display the table of key/value pairs. This is similar to what you did in the last assignment using ajax. This time however the creation of the table should be done on the server.



Below the table, create a new div that contains a form that will be used to add key/value information to the database. The form should expect the key, value and password. After the data is added make sure to display an OK or Fail message and to resend the current values in the database.



Submit:



link to the working solution on your openstack instance



Link to your git solution



You can run the createAndTestInfo.php program from the command link (php createAndTestInfo.php) to setup your database.






Video showing my solution:










451-week2b-display-solution



























0:00 / 2:29


















1x
































Some Rubric (26)




Criteria






Ratings




Pts




























Data Displays
3.0 pts








0.0 pts




























Full Marks




No Marks




3.0 pts




























Adds data
5.0 pts








0.0 pts




























Full Marks




No Marks




5.0 pts




























Displays
2.0 pts








0.0 pts








add/error
















Full Marks




No Marks




2.0 pts


message




























































Code Quality
5.0 pts
4.0 pts
3.0 pts






2.0 pts
0.0 pts


















Full
minor code quality
some code


significant
No
5.0 pts




Marks
errors -indentation,
quality


code quality
Marks


























Misc
2.0 pts
etc
1.0 pts
errors
0.0 pts
errors










































Full


late or other submission


late and other submission
2.0 pts




Marks


error






error





































Total Points: 17.0

More products