PHP, Database and XML/JSON Solved

45.00 $

Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip solution files instantly, after Payment


5/5 - (1 vote)


You are required to develop a web application to process XML and JSON data. The application will use PHP, Database, XML, and JSON.


  1. Create a XML file which contains data of students (say, students.xml). The elements should be:
    • student_id; attribute email
    • lastname
    • firstname
    • address
  2. You will need a database table which contains data used to validate users before they are able to log into the website. Create a logintable in Oracle (student)database with the appropriate fields. Once a user is logged in, they should have different views depending on their privilege. A “normal” user may only lookup data in xml; an “administrator” should be able to insert student data into students.xml.
  3. Populate xmland the login table with some data.
  4. Download the JSON file called jsonfrom: university link(I have downloaded it, details are following) This file contains environmental data captured from environmental sensors. Users will be able to lookup data in sensor.json.





“motelocation”:”Canteen, ground floor”,













“motelocation”:”Classroom Hallway, second floor”,













“motelocation”:”Football Field, ground floor”,














  1. Login page (3 marks)
    Create a Login page which accepts a username and password. Create two username/password for testing :

    • admin/SIT780 (grant the user administratorprivilege)
    • guest/SIT780 (grant the user normalprivilege)

Prepared statements reduce the risk of SQL injection. Hence, prepared statements need to be used to implement the login functionality.
Captcha needs to be used in the login page to ensure that a human-being is attempting to login.

  1. Welcome page (1 mark)
    After successful validation, a welcome page should be displayed. The welcome page should display a welcome message and also clearly state the privilege assigned to the user (normal or administrator). Create a menu to navigate to the options in #3, #4, #5 and #6 below.
  2. Display data from sensor.json (3 marks)
    json contains environmental data captured from sensors placed around a school. Parse sensor.json and display data in a HTML table. Assign background color to HTML table data to highlight high/low values of temperature and humidity.
  3. Display student data (3 marks)
    Parsexml and display data in a HTML table.
  4. Search student data (4 marks)
    Provide an interface to search xml by firstname or lastname. Appropriate results should be displayed.
  5. Insert student data (3 marks)
    Only an administrator should have access to this option. Provide an interface to accept values for student_id, email, lastname, firstname and address. The data should be appended to xml
  6. Visualisation of address information in Google earth (3 marks)
    Enhance the requirement #4 and #5 so that each student record has a hyperlink to visualize the location information in Google Maps. Refer to the example:

which is a modification of sample code from Google Maps.


You need to submit:

  1. The URL of the ‘home page’ of your system on university server; for example, if your username is Bhagya and you have put your assignment in the folder /public_html/, you would submit something like this:
  2. An assignment cover sheet. It can be submitted as an attachment or as a page on your website.
  3. Submit all your source files as a zipped (.zip or .rar) file.