Giter VIP home page Giter VIP logo

basic-php-website's Introduction

Basic PHP Website

This project, build a simple website using the PHP programming language. The web site, a media library, will let you organize and display your Books, Movies and Music. Could easily use this project to create a website that lets you organize and display any type of item: Branch Locations, Products, Services, Events, even Courses.

Will learn:

  • Organizing and Displaying Inventory
  • Reusing Code
  • Email and Form Data

I.) Building a Media Library in PHP

Our media website will have a number of pages, but the pages share a few common elements like the top navigation menu and the footer. We’ll build these shared elements into a set of template files, using basic programming concepts like variables and conditionals to make it all work.

II.) Listing and Sorting Inventory Items

Media library contains quite a bit of information, too much to fit in simple variables. A PHP array will be perfect for the task, and we’ll explore all the ins and outs of working with arrays to store sets of related data. Use the data from the array to populate our category pages that shows a list of all the media in our catalog.

We want to have separate pages for the different categories of media items, but the layout should be the same on each of these pages. We’ll work with PHP functions, blocks of code that can be called from other blocks of code, to make sure that media items are displayed the same across all list pages. PHP comes with a large number of native functions, but it also provides a way to create our own.

III.) Adding a Basic Form

PHP does more than just make a set of HTML files easier to maintain. It also adds advanced functionality to a site that HTML and CSS alone cannot achieve, like sending an email. We’ll create a suggestion form for our website, allowing users to enter a media suggestion into an HTML form and then using PHP to process the form submission.

IV.) Enhancing a Form

Our suggestion form currently checks that the information submitted by visitors to our site is valid, but we need to improve how validation errors get displayed. We’ll enhance the flow of our code that handles form submissions, displaying error messages within the context of the form and carefully avoiding a common security vulnerability by escaping our output.

basic-php-website's People

Contributors

aeimskei avatar

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.