PHP Basics - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

PHP Basics

Description:

PHP Basics – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 9
Provided by: MCP392
Category:
Tags: php | basics | kung

less

Transcript and Presenter's Notes

Title: PHP Basics


1
PHP Basics
Session 02
2
PHP Basics
Tonights agenda
  • Conditionals
  • Loops
  • Includes
  • Super global variables
  • Simple validation

3
Conditionals
Because it all depends
  • if
  • elseif
  • else

4
Loops
Keep it coming
  • While
  • For
  • Foreach

5
Includes
Weve gotta keep em separated
  • include v. require (and require_once, etc.)
  • include(filename.inc.php)
  • naming conventions

6
Super Global Variables
Kung POW!
  • _SERVER
  • HTTP_HOST
  • HTTP_USER_AGENT
  • HTTP_REFERER
  • DOCUMENT_ROOT
  • SCRIPT_NAME
  • PHP_SELF
  • _COOKIE, _FILES,
  • GLOBALS, _GET,
  • _POST

7
Simple Validation
Hmmm. OK, you can come in
  • imaginary form (use variables)
  • name, email, message
  • check variables not empty
  • if variable empty,
  • set error message
  • if message not blank display confirmation
  • if message blank display errors

8
Wrap Up
Getting the hang of this
  • Some similarities to JS
  • Server stuff is new

Next time Forms
Write a Comment
User Comments (0)
About PowerShow.com