First you need to connect to the database with your name and password and create a query. I personally prefer to set the passwords and table names in a diffrent php file and then reffer to it, so if any changes have to be made you need to do them only once.
Here's an example of such a file:
varia.php
<?
$db_server="localhost"
$db_pass="mypass"
$db_name="dbname"
$db_table="dbtable"
?>
Then when you click on your form's submit buton the "myfile.php" in your example needs to connect to the database using the password info and put the data in the $db_table.
Here an example of such a file:
you ned a mysql table with the field State City and zip
myfile.php
<?
require("varia.php")
//mysql query to fire at the database
$sql = "INSERT INTO $db_table (city, state, zip) VALUES ('$City', '$State', '$Zip')";
//connect to the database
$connection = mysql_connect("$db_server", "$db_name", "$db_pass") or die("error no conection");
//fire query at database
$sql_result = mysql_query($sql, $connection) or die("an error occured");
?>
I use a lot of variables, they are not necsecary for small applications, but if the application grows (and it always does) this is the best method. put the things you think can or might change in the future (like passwords) in a seperate file and "require" it in all you php pages
I hope i've helped you,
if any questions {
ask them }
elsif{ good luck!}
Johan