So point by point:
1)MySQL is the best for it. Use CREATE TABLE - it's Structured Query Language - will work with many databases. The documentation for MySQL can be found here. The easiest way would be to use phpmyadmin, if your web provider has it . If not, use mysql client (the hard way). Example
CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(32) NOT NULL default '',
`pass` varchar(32) NOT NULL default '',
`email` varchar(255) NOT NULL default '',
`email_addy` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
2) Just write a page
<?php
if (isset($_POST['submitted']))
{
//process data
}
else
{
echo <<<END
Write here your form, as in normal html. The only difference would be with the action:
<form method="post" action=$_SERVER[PHP_SELF]>
inputs here for all data you need
<input type="submit" name="submitted" value="Send">
</form>
END;
}
?>
and save it as any name with php extension.
3) To insert data into your database, INSERT sql is needed: INSERT
Example:
INSERT INTO `users` ( `id` , `username` , `pass` , `email` , `email_addy` )
VALUES (
'', 'test', 'password_test', 'test@test.com', 'whatever it means'
);
you can run the query at the script above, where there is "process data" written now To use mysql from php try looking here: [man]mysql_connect()[/man]
4) This page should use the same mysql connection functions but a different SQL query - this time SELECT
Example (a list of usernames with id):
SELECT id, username FROM users
My general advice would be: search google for quick php tutorial and mysql tutorial (or php and mysql tutorial). This should speed things up.