PHP & MYSQL Essentials Project Management

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 35

PHP & MYSQL Essentials

Project Management

Hadji J. Tejuco
Topics
What is PHP?
PHP History
Why use PHP?
Installation Tools
Activities
What is PHP
Server –side, scripting language
◦ Scripting – response to events
◦ Run on server
◦ Need a web server
◦ Does not need to be compiled
Designed for use with HTML
Provide more flexibility than HTML
Syntax is similar to C, Java, Perl, ASP.
PHP History
Version 1: 1994
◦ Cgi binaries in the C Programming Language
◦ Ramsus Lerdorf in 1994
Version 2: 1995
◦ “Personal Home Page Tools”
Version 3: 1998
◦ PHP : Hypertext Preprocessor (Recursive
Acronym)
◦ Zeev Suraski 
◦ Andi Gutmans
PHP History
Version 4: 2000
◦ Zend created the core of PHP
◦ Still actively supported updates
◦ Version 4.4.6 on March 1, 2007
Version 5: July 2004
Current Version is 5.3.3
Why use PHP?
Open Source / Free Software
Cross platform to develop, to deploy and to
use
Powerful, robust, scalable
Web development specific
◦ Design for web developers
Cab be Object Oriented, especially version 5
Great documentation in many language
◦ www.php.net/docs.php
Large active developers community (20
million websites uses php)
Installation Tools
Web Server
PHP
Database
TextEditor
Web Browser
Tools
Web Server
(Apache)
PHP (Version 5.2.1 or the latest)
Database (Mysql 5.0)
Text Editor (Notepad++)
Web Browser (Mozilla)

LAMP, WAMP, XAMPP, MAMP


Tools
PHP (www.php.net/manual/en/install.php)
◦ Windows 98, ME or NT / 2000
◦ XP, Vista and Windows 7
Apache(httpd.apache.org)
MYSQL (devMysql.com
WAMP (www.wampserver.com/en/index.php
)
XAMP (www.apachefriends.org/en/xampp-
windows.html)
PHP Tags
<? Php

phpinfo();

?>
Helloworld.php
<html>
<head>
<title> Hello World </title>
</head>

<body>
<?php echo "Hello World!"; ?> <br />
<?php print "Hello World"; ?> <br />
<?php echo "Hello"." World"; ?> <br />
<?php echo 5+5; ?> <br />
<?php echo 3*2; ?> <br />
<?php echo 4*10; ?> <br />
</body>
</html>
Operational Trail
Operational Trail
Comments
Single line comment uses
◦ //
◦#
Double line comment
◦ /*
 Your comment goes here…
◦ */
Variables
Symbolic representation of a value
Can change

Rules in using Variable name


◦ Start with a $
◦ Followed by a letter or underscore
◦ Can contain letters, numbers, underscore and
dashes
◦ No spaces
◦ Case-sensitive
Examples of Variable Names
$item
$myVariable //Camel Case
$this_variable
$this-variable //Not practical
$product3
$_book
$__bookpage //uses double underscore
do not use (stay away)
Activity

1.Varialbe.php
2.String.php
3.Stringfunction.php
4.Numbers.php
5.Floats.php
6.Arrays.php
7.Arrayfunction.php
8.Booleans.php
9.Typecasting.php
10.Constants.php
Logical Operators
If Statements
◦ Logical.php
 Single if
 If / Then / Else
 Logical Operators
Switch Statements
Loops
While Loops
For Loops
For each loop
Continue
Break
Pointer
Functions
Using Functions
Return Values
Global
Default Values
Debug
Using Debug
Links
Links
URL Values
Encoding
HTML encode
Forms
Cookies
Sessions
Headers
Include
Ways to get data from the user
URLs / Links GET
Forms POST
Cookies COOKIES
MYSQL
Introduction
to MYSQL
PHPMYADMIN
PHP Project File
 Creating a Content Management System
◦ (CMS)
◦ Blue print
◦ CMS database
◦ Relationship in the Database
◦ Project Setup
◦ Staff Menu
◦ Includes
◦ Using Database
◦ Navigation
◦ Navrefactor
◦ Navlinks
◦ SelectednavLinks
◦ hrefselected
Find Subjects
Find Subject
Find Page
New Subject
Subject Form
Create Subject
Mysql Escape
Validation
Subject Edit
PHP Project (CMS)
CMS Blueprint
CMS Main Screen
CMS Products Section
Login in Area
Menus for Editing
Edit Functions
Edit Pages
Creating Users

You might also like