Hey! Don't fret about this one! This is easy! Ok ... Lets rebuild your form just so you can get the basics of how this whole thing will work. You will have one box that says Name: and have a blank box. No colors or anything... this is just for learning purposes. Now your table in MySQL will be set up::
Tablename = example
Fields = table_id (INT NOT NULL AUTO_INCREMENT)
= name (TEXT)
Primary Key = table_id
Page name = example.php
<?php
if(isset($insertname)){
$name_final= Htmlspecialchars($name);
$db = mysql_connect("localhost","username","password");
mysql_select_db("databasename", $db);
$sql = "INSERT INTO example
VALUES(NULL,'$name_final')";
mysql_query($sql);
echo "Everything went in correctly. With some work this will be awesome!";
exit;
}
?>
<head><title>Brokenformula.com</title></head>
<body>
<form method="POST" action="example.php">
<p>Name:<input type="text" name="name" size="33"></p>
<p><input type="submit" value="Insert My Name Please" name="insertname"></p>
</form>
</body>
That is it! Not that hard. Now just expand and learn on this. Your possibilites are endless and so are my spelling mistakes. Thank goodness I am not the editor for my website! Check it out.. http://www.brokenformula.com/
Chad R. Smith