> I am a big novice with MySQL and PHP. I need a script that enters
information from a html form into a MySQL database. Can anyone tell me
where I can find one that I can just replace the table and database
name? PLEASE I NEED IT ASAP!!!
form.htm
<html><head><title>Your title</title></head><body>
<form name="form1" method="post" action="input.php">
<input type=text name=001>
<input type=text name=002>
<input type=text name=003>
etc. etc.
Submit button
</form>
</body></html>
end of form.htm
input.php
<?php
$db = mysql_connect("server","username","password") or die("Cannot connect
to server");
mysql_select_db("databasename",$db) or die("Cannot find database");
$sql = mysql_query("INSERT INTO tablenam (field1, field2, field3, the names
of your fields in the table) VALUES('$001', '$002', '$003', 'the names of
the input types you want to insert in the fields in your database')") or die
(mysql_error());
?>
end of input.php
Martijn