lessons in php for michele ... jan 18, 2002
lesson 1 - the output from a php file is the html which is generated for the browser
in action
the code
in action
the code
lesson 2 - how the php layer is used to do all the programming tasks for the html layer
in action
the code
lesson 3 - there are 4 basic data types in php:
in action
the code
lesson 4 - the types can be changed ("cast") into other types:
in action
the code
lesson 5 - operations you can do on integers and doubles:
in action
the code
in action
the code
lesson 5a - string manipulation:
in action
the code
lesson 6 - comparison operators and logic:
in action
the code
lesson 7 - user defined constants, predefined constants and predefined variables:
in action
the code
lesson 8 - flow control
in action
the code
lesson 9 - processing user supplied input - a simple adding calculator:
the form - using GET
the form - using POST
the html code
the php code
lesson 10 - processing and storing user supplied input - a simple bullitin board:
the html in action
the html code
the php code
lesson 11 - a mysql primer:
some mysql commands
lesson 12 - building a database and interfacing it with php
0. get a username, password and a database name that you can work with from the mysql admin
1. from a shell do mysql -u duck -p < lesson12.mysql or else log onto the mysql server and type the commands manually
2. write an html form which either a. gets the info to put into a database, or b. searches the database for information that is already there:the html in action - see what values are sent over by the html form to the php - don't enter them
the html code
the php code - this just displays the values
the html in action - do it, get the php to put the data into mysql
the html code
the php code - this puts the data into mysql
your ip address and other info about your browser
in action
the code
cookie counter - counts the number of times you've visited the page by storing info as a cookie
in action
the code
for mysql administration:
some admin mysql commands
GPG Signiture:
Blueness (Sys Admin) <blueness@virtualblueness.net>
KeyID = 3667BBF9
Key fingerprint = E924 C48C 1CCA 779F 7B51 2F3B E880 5669 3667 BBF9
Keys are available at pgp.mit.edu and www.keyserver.net