linux apache php mysql lamp1273
TRANSCRIPT
GNUNIFY '08
Welcome to AJAX with LAMPWorkshopHussain Fakhruddin
Overview of LAMP
Introduction
Client Server Model, What are web servers
What is PHP? Why Use PHP?
PHP Crash Course
Language Reference: Variables, Controls, Loops etc.
Introduction
What is PHP
PHP: Hypertext Preprocessor
Why not HTP or HP or HPP?
Recursive Acronym
An acronym in which the first letter of the first word is represented by the acronym itself.
GNU = GNU is NOT UNIX
PHP: PHP Hypertext Preprocessor
Why Use PHP
If you want to add dynamic content to your pages
If you want to make your pages easier to maintain
If youre learning your first "real" computing language
If you need a solution thats portable across multiple platforms (e.g. Red Hat Linux to Windows 2000)
If you like free software or need a free solution
Examples of uses of PHP & MySQL:
Sign-up Forms
Surveys
Polls
Email a Postcard
Content Management
What you need to start a website?
What you need?
Server
PHP parser
Configurations.
Some basic configurations
Save all your file in
Run from browser as
http://localhost/ < FILENAME >
Open any Text Editor and start coding
PHP Crash Course (cont.)
Embedding PHP in HTML
Hello World!
PHP tag styles:
XML: , Short: , ASP:
Script:
PHP Crash Course (cont.)
Adding dynamic content by adding the date to the page.
Hello World!
Date() http://www.php.net/manual/en/function.date.php
PHP Function Reference http://www.php.net/manual/en/funcref.php
One useful function is phpinfo(). Gives system information so you can quickly find out whats on your machine.
Using PHP to Query a
MySQL Database
A List of Users Who Have Signed Up For OscarPool
AJAX
What's Ajax the buzzword
Stands for Asynchronous JavaScript and XML
Its a web development technique.
Its Faster and Interactive.
Who uses Ajax?
Gmail
Google Maps
Meebo
Ebuddy
And many more
Technology behind AJAX
Why Ajax?
Faster,
Increase Interactivity
Rich User Experience
Steps to AJAX
Create a XMLHttpRequest request object
Tell the request object where to send the request
Tell the object what to do when the request is answered
Tell the object to make a request
Lets Code
var XMLHttpRequestObject = false;
if (window.XMLHttpRequest) {
XMLHttpRequestObject = new XMLHttpRequest ();
}
else if (window.ActiveXObject) {
XMLHttpRequestObject = new ActiveXObject ("Microsoft.XMLHTTP");
}
if (XMLHttpRequestObject) {
document.write ("Welcome to AJAX");
}
PHP & MySQL Resources
Web Sites
http://www.php.net/
http://www.phpbuilder.com/
http://www.devshed.com/
http://www.phpmyadmin.net/
http://www.hotscripts.com/PHP/
http://www.mysql.com/
http://www.owasp.org/
Books
PHP and MySQL Web Development 2nd Edition, Welling & Thomson
Web Database Applications with PHP & MySQL, OReilly Publishers
PHP Cookbook, OReilly Publishers
MySQL Cookbook, OReilly Publishers
My special Thanks to:
David Olsen ([email protected]) for his help in presentation's content.
PHP Freaks (http://www.phpfreaks.com) This is where I learnt PHP from
Click to edit the title text format
Click to edit the title text format
Click to edit the outline text format
Second Outline Level
Third Outline Level
Fourth Outline Level
Fifth Outline Level
Sixth Outline Level
Seventh Outline Level
Eighth Outline Level
Ninth Outline Level