Resources

CSS, the Missing Manual David Sawyer McFarland
PHP and MySQL Larry Ulman
Manga Guide to Databases Shoko Azuma

useful programming resources

W3 Schools programming resources

Tiztag programming resources

About.com

Web site security rules

Learning Ruby, an interactive Guide

An HTML validation tool, Very Important

Lists and CSS styles elegantly explained

Step by step lessons in PHP programming


Useful tools

Text Wrangler - General Purpose text editor

Transmit Text Edit and FTP client

The Total Validator validation tool


Building a cool website using HTML, PHP and MySQL

coming together

Dynamic web pages usually have three parts.

  • An HTML viewer page
  • a script engine to access the database and generate the HTML page
  • a form for users to create user friendly requests
  • a database

The database engine is generaly very user unfriendly. Seeking a specific type of information requires several discrete steps and if any one of them is wrong, you get an error and a refusal to provide the information. Since the business of creating a web resource is to provide the resource to users, you can provide tools through PHP and HTML to give your users a helpful way to search for information.

For example, you want to find books by an author, but you are kind of vague about his name. The MySql code for this looks like:

mysql> select books.title as title, concat(authors.efname,' ',authors.elname)
    -> as scribe,books.book_id as id,
    -> Topics.topic as subject from books
    -> inner join 
    -> bookswritten using(book_id)
    -> inner join authors using(writer_id)
    -> inner join Topics using(Topic_id)
    -> where authors.elname like 'Prat%'
    -> group by books.title order by authors.elname, books.title;
+-------------------+------------------+-----+-----------------+
| title             | scribe           | id  | subject         |
+-------------------+------------------+-----+-----------------+
| Feet of Clay      | Terry  Pratchett | 198 | fantasy         |
| Fifth Elephant    | Terry  Pratchett | 233 | fantasy         |
| Going Postal      | Terry  Pratchett | 175 | Romance         |
| Good Omens        | Terry  Pratchett | 134 | Science Fiction |
| Hogfather         | Terry  Pratchett | 145 | fantasy         |
| Johnny & The Dead | Terry  Pratchett | 133 | Science Fiction |
| Lords and Ladies  | Terry  Pratchett | 197 | fantasy         |
| Making Money      | Terry  Pratchett | 195 | fantasy         |
| Reaper Man        | Terry  Pratchett | 201 | fantasy         |
| Soul Music        | Terry  Pratchett | 202 | fantasy         |
| the Truth         | Terry  Pratchett | 200 | fantasy         |
+-------------------+------------------+-----+-----------------+
11 rows in set (0.02 sec)

This is not the kind of customer service that will have folks flocking to your bookstore or your library. They want a form that looks like this

And gives a result that looks a bit like this


SectionAuthorTitle
fantasy Terry Pratchett Feet of Clay
fantasy Terry Pratchett Fifth Elephant
Romance Terry Pratchett Going Postal
Science Fiction Terry Pratchett Good Omens
fantasy Terry Pratchett Hogfather
Science Fiction Terry Pratchett Johnny & The Dead
fantasy Terry Pratchett Lords and Ladies
fantasy Terry Pratchett Making Money
fantasy Terry Pratchett Pyramids
fantasy Terry Pratchett Reaper Man
fantasy Terry Pratchett Small Gods
fantasy Terry Pratchett Soul Music
fantasy Terry Pratchett the Truth

There are direct links to the books in question in the result.

PHP is the bridge between the data base and the user.

PHP is an interpreted scripting language like Javascript, only it works on the server side rather than on the client side like javascript. requests are sent to the host computer by the user, where they are processed remotely. like all scripting languages it deals with variables, process controls, and other server processes, like MYSQL

PHP is not the only interactive scripting language out there. It is an extension of another scripting language called PERL. A very brief history of PHP can be found here. PERL can also be interpolated, but PHP has a few advantages in its ease of use and its ability to use Object Oriented programing.

Next, How PHP brings HTML And MySQL together.

| page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 |
Last updated 5/14/09