Hi,
I have included a simple form processing code below for you, yes its simple if you know basic html and have set up your tables in a MySQL or similar database.
Remember to pass your variables across when processing your form, this page will be processed on the same page and should be named form.php, then just code away, adding as many fields as you have in your tables, look carefully and you will see the simple process of adding to your form and to your database. Also this handles a simple mail() comand.
<? if (\"$form\"==\"filled\") {
$hostname = \"host name\";
$username = \"your username\";
$password = \"your password\";
$dbName = \"database name\";
MYSQL_CONNECT($hostname,$username,$password) OR DIE(\"Unable to connect to database\");
@mysql_select_db(\"$dbName\") or die(\"Unable to select database\");
mysql_query(\"insert into tablename values (\'$id\', \'$value1\', \'$value2\')\");
print\"Data has been added<p>\";
mail(\"$email\",
\"$subject.\",
\"Hello $name,
$value1
$value2
You can also print a message here as well.\",
\"FROM: you@yourdomain.com\");
} else {
echo\"
<form method=POST action=\'form.php?form=filled\'>
<p>Name (NOSPACES): <input type=text name=name size=40 value=\'\'></p>
<p>Name (NOSPACES): <input type=text name=value1 size=40 value=\'\'></p>
<p>Name (NOSPACES): <input type=text name=value2 size=40 value=\'\'></p>
<p>Content:</p>
<p>There email address: <input type=text name=email size=40 value=\'\'></p>
</form>
\";
}
?>
PS/ This has a form in the script as well. Just change the form, add fields as you require, just remember to carry those variables across to the results!!