Forum Moderators: coopster
<?php
$con = mysql_connect("","dropdown","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("dropdown", $con);
$firstname = $_POST['firstname'] ;
$sql="INSERT INTO buttons (one)
VALUES
('$_POST[firstname]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";mysql_close($con)
?>
input field name is "firstname"
<form action="http://www.website.com/dropdown.php" method="post">
first name<input type="text" name="firstname" />
<input type="submit"/>
</form>