Git Product home page Git Product logo

globitekcms's Introduction

Project 1 - Globitek CMS

Time spent: 4 hours spent in total

User Stories

The following required functionality is completed:

  1. Required: Create a Users Table
  • Required: Use the command line to connect to the database "globitek".
  • Required: Define a table "users" with the required columns.
  1. Required: Create a Page with an HTML Form
  • Required: It has required text inputs.
  • Required: It submits to itself.
  • Required: It looks correct in a browser.
  1. Required: Detect when the form is submitted.
  • Required: When page loads, page displays the form.
  • Required: When form submits, page retrieves the form data.
  1. Required: Validate form data.
  • Required: Require the provided validation functions library.
  • Required: Validate the presence of all form values.
  • Required: Validate that no values are longer than 255 characters.
  • Required: Validate that first_name and last_name have at least 2 characters.
  • Required: Validate that username has at least 8 characters.
  • Required: Validate that email contains a "@".
  1. Required: Display form errors if any validations fail.
  • Required: Do not submit the data to the database.
  • Required: Redisplay the form with the submitted values filled in.
  • Required: Report all errors as a list above the form.
  • Required: Test each field to ensure you get the expected errors.
  1. Required: Submit successfully-validated form values to the database.
  • Required: Write an SQL insert statement.
  • Required: Add current date and time to "created_at".
  • Required: Follow best practices regarding the query result and database connection.
  • Required: Use the command line to check the records.
  1. Required: Redirect the user to a confirmation page.

    • Required: Locate the page "public/registration_success.php".
    • Required: Redirect the user to the new page. (Tips)
  2. Required: Sanitize all dynamic output for HTML. (Tips)

The following advanced user stories are optional:

  • Bonus 1: Validate that form values contain only whitelisted characters.

  • Bonus 2: Validate the uniqueness of the username.

Video Walkthrough

Here's a walkthrough of implemented user stories:

Video Walkthrough

GIF created with LiceCap.

License

Copyright [2017] [William Huang]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

globitekcms's People

Watchers

 avatar  avatar

globitekcms's Issues

Project Feedback!

Hello William,

๐Ÿ‘ Nice work! In order to learn web security, we have to learn the basics of web development. Because web development isn't the goal of this course, everyone will receive the same UI score, so you can focus on the security aspects of the course.

We're using PHP because Facebook is sponsoring this course, but it's also the easiest framework to demonstrate some of these security issues. PHP without a framework is very similar to Sinatra (Ruby) or Flask (Python), which are two very popular barebones web frameworks. Modern PHP with a framework is very similar to Rails and Django. All of the tasks in the weekly projects are very similar and applicable to what you would need to do in Ruby or Python.

The purpose of this assignment was to explore the following concepts:

  • Setting up a database table.
  • Handling GET vs POST requests.
  • Doing server-side form validation.
  • Displaying form errors.

To evaluate your understanding this week, you should try to answer the following questions:

  • How are form values sent to the URL in the form action?
  • How can PHP access form values?
  • How do you interpolate a variable into a string in PHP?
  • What sanitization does PHP do automatically?
  • When using PHP's mysqli_connect() to connect to MySQL, what gets returned?
  • What does mysqli_fetch_assoc() do besides return a row of data?
  • What happens if a loop's condition is never met?
  • Why is it a good practice to use "LIMIT 1" when updating a MySQL record?
  • What types of problems could arise if all validations were removed?
  • Why should form attributes still be assigned values if a form has errors?
  • What potential problem would the last name "D'Angelo" create for the database?

If you have any particular questions about the assignment or the feedback, email us at [email protected].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.