در این آموزش تصویری با ساخت یک وب سایت ساده با PHP آشنا می شوید.
این دوره آموزشی محصول موسسه TreeHouse است.

سرفصل های دوره:

  • نحوه راه اندازی پروژه
  • نحوه ساخت وب سایت
  • نحوه استفاده از کدهای PHP در سایت
  • نحوه اسکریپت نویسی
  • بررسی یک مثال از PHP
  • نحوه افزودن سرصفحه و پاورقی
  • اضافه کردن صفحات اضافی
  • کار با فایل های عمومی
  • نحوه استفاده از متغیرها
  • نحوه برچسب گذاری صفحات
  • دریافت داده های فرم با استفاده از GET و POST
  • کار با متغیرها
  • کار با دستورات شرطی
  • و…

عنوان دوره: Treehouse Build a Basic PHP Website
نویسنده: Alena Holligan


Treehouse Build a Basic PHP Website

Alena Holligan

About this Course
This project will show you how to 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. You 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 like we have here on Treehouse.
What you'll learn
Organizing and Displaying Inventory
Reusing Code
Email and Form Data
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.
Extra Credit
Add another page to the menu for something like "Company Information." You'll need to complete the following steps:
Create a new PHP file for the page, making sure to set the $section variable.
Modify header.php to display the new menu item, making sure that it is underlined when someone is on the new page.
Create an icon for the menu item.
Modify the CSS file to display that new icon, as well as to make room for the extra item in the menu.
Listing and Sorting Inventory Items
Our 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. We'll also 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.
 19 steps
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.
 20 steps
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.
 14 steps

 11 steps
Setting Up the Project
Using PHP Code on Our Site
A Simple PHP Example
1 objective
Including the Header
Including the Footer and Adding Additional Pages
Basic PHP and Including Files
5 questions
Using Variables for the Title Tag
Working with _GET Variables
Variables and Conditionals
6 questions
Adding Active States to the Navigation
Variables and Conditionals
3 objectives