Here I will teach you how to create a really basic login-system for use in php and mysql. The system can easily be built on to work with flash and other applications.
I'll just start:
First you need a "data.php" file that looks like this:
<?php
$dbc = mysql_connect("localhost","***username***","***password***"); mysql_select_db("***db_name***");
session_start();
?>You also need a database with a table (registered) with fields that look like the SQL code below. (If you want, you can copy it into phpMyAdmin and it will create the table.)
CREATE TABLE `registered` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(64) NOT NULL,
`password` varchar(32) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8;