home search Contact
Lmarsden is a non-profit information site

Week 04: Dynamic Websites - Assignment Preparation.

Class Task and Information

  • Lesson 1:
    • Lost due to sports day.
    • Connecting to the Digital Zone Server: Tutorial by Ben

  • Lesson 2:
    • Video Tutorial Files -= What to Do =-
      • You will need to view the video file and stop it along the way so you can implement, do what the video files shows you.
      • Remember: Information Action = KNOWLEDGE
      • Remember to save your work as you go.

    • Practical Tutorial 01: PHP - Using Sessions in Dynamic Websites

      • Task: Sessions are important to create server side dynamic global variables. You will use these to control the login system for the user and retain important information that is cycled throughout your assignment. You must have a good understanding of sessions for your project.

    • Practical Tutorial 02: php - Redirects to control visible pages with header("Location:index.php")

      • Task: Implement redirects within your pages of your test site. You will need to use this process to ensure the user has completed the login process and users can not directly URL to pages navigating around your security.

    • Practical Tutorial 03: php - Creating a login / logon page connection to a SQL database

      • Task: In this tutorial, we will develop a login page to connect to a SQL database using the PDO method, then we will build and send a SQL query and if there is a result, we will log the user on using sessions. This tutorial will help developers create a isset flag to control users being logged in through server-side sessions using the request and response cycle. This brings together all the tutorials and learning so far this term. I will be expecting to see this system working next lesson.

    • Upload evidence of your application of the tutorials to myFlinders and the connection to your major project.

  • Lesson 3: To be updated
    • Developing a navigation bar. - Simple navigation for when user authenticate on your system.

    • Develop your navigation for the CRUD cycle and make pages for each of the dynamic functions.

    • Getting the CRUD to happen.
      • Using phpMyAdmin and also SQL terminal server demonstrate the following skills in a short screen recording on how to do CRUD using both methods:

          • Create data

        • //-- SQL CREATE -- structure for adding 1 new row.
          $sql = "INSERT INTO LDAP (id, username, password)
          VALUES ('$record_id','$username', '$password')";
          $db->exec($sql); // executes the SQL command

        • Read Data (show all the data in a table)

        • //-- SQL READ --
          $sql = "SELECT username, password ";
          $sql .= "FROM LDAP ";
          $sql .= "WHERE username = '$user_name' AND password = '$password' ";
          $sql .= "ORDER By id";

        • Update a record within a table

        • //-- SQL UPDATE --
          $sql = "UPDATE LDAP SET username='$username', password = '$password' WHERE id='$record_id'";
          // Prepare statement
          $stmt = $db->prepare($sql);
          // execute the query

        • Delete a record within a table

        • //-- SQL DELETE --
          $sql = "DELETE FROM LDAP WHERE id='$record_id'";

  • Lesson 4: Bootstrap and Navigation

Readings / Homework
  • Upload evidence of your application of the tutorials to myFlinders and the connection to your major project.




Focus Point