Menu
I don’t get it. I followed exactly the instructions in several tutorials, yet I can’t get this basic form into the database.
<form action=”form.php” method=”post”>
Name:
<input type=”text” name=”name”>
<input type=”submit” name=”submit” value=”Submit”>
</form>
and FORM.PHP is:
<?php
$link = mysql_connect(“localhost”,”root”);
mysql_select_db(“guestbook”);
$insert = mysql_query(“insert into guest values (‘$name’, ‘2’, ‘3’, ‘4’,’5′)”, $link);
echo “Thanks for signing my guestbook!”;
?>
The 2, 3, 4, 5 will be added to their respective columns, but not the text in the $name.