Here's an example of inserting data... Include your db connection stuff, of course. This just includes the form and the SQL INSERT statement for contact information (for American addresses, anyway).
In terms of going from an HTML form to your db, the form input NAME (eg name="firstname" below) becomes your variable name in PHP (INSERT into contact values (NULL,'$firstname',...) (first value is NULL in this case because it's an auto_increment primary key).
Probably isn't the greatest example of PHP code either, but it works. There are a lot of tutorials out there on MySQL/PHP that can give you more information.
<?php
if(!$enter) {
?>
<H2 align=center>Contact</H2>
<FORM action=<?php echo $PHP_SELF ?> method=post>
<P align=center>
<TABLE BORDER=0 ALIGN=center WIDTH=500>
<TR><TD>First Name</TD>
<TD><INPUT TYPE=text name="firstname" size=36></TD>
</TR>
<TR><TD>Last Name</TD>
<TD><INPUT TYPE=text name="lastname" size=36></TD>
</TR>
<TD>Email Address</TD>
<TD><INPUT TYPE=text name="email" size=36></TD>
</TR>
<TR>
<TD>Address</TD>
<TD><INPUT TYPE=text name="address" size=36></TD>
</TR>
<TR>
<TD>Address line 2</TD>
<TD><INPUT TYPE=text name="address2" size=36></TD>
</TR>
<TR>
<TD>City, State</TD>
<TD><INPUT TYPE=text name="city" size=32>,<INPUT TYPE=text name="state" size=3></TD>
</TR>
<TR>
<TD>ZIP</TD>
<TD>
<INPUT TYPE=text name="zip" size=5>-<INPUT TYPE=text name="zipextra" size=4></TD>
</TR>
<TR>
<TD>Phone</TD>
<TD>
<INPUT TYPE=text name="phone" size=17></TD>
</TR>
<TR ALIGN=center>
<TD COLSPAN=2><INPUT TYPE=submit name="enter" value="Alright"> <INPUT TYPE=reset name="reset" value="Clear"></TD>
</TR>
</TABLE>
</FORM>
<?php
}
if ($enter) {
$sql = "INSERT into contacts VALUES (NULL,'$firstname','$lastname','$email','$address','$address2','$city','$state','$zip-$zipextra','$phone')";
$result = mysql_query($sql);
if(!$result) {
echo("<P>Oops: ".mysql_error());
} else {
echo("<P>Contact information saved. Thanks!"

;
}
}
?>
Hope this helps you out some. Matt
matt@paperlove.org
If I can help, I will.