How To..

Or if your one of those smart guys, you can check the all-in-one page that has all the above functions dumped into one little page.

Before you Start!

These pages are to show you HOW PHP works, it is not a walkthrough! This is how I personally learned PHP, I looked at someone elses code and took my bits from it to make my own, the following pages are pieces of code you can use to copy your bits from.

The following pages rely on a MySQL database, to run any of the scripts you see here for yourself you'll need;

a database named 'learn', once you've created this database run the following query on it:

CREATE TABLE `data_table` (
  `id` smallint(6) NOT NULL auto_increment,
  `data` text collate latin1_general_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  AUTO_INCREMENT=2 ;

INSERT INTO `data_table` (`id`, `data`) VALUES 
(1, 'This data was already here2..'),
(2, 'And so was this..');

Complete Reference

PHP

MySQL

uppercase characters are MySQL commands, lowercase characters are custom data.