I have the following php script that will pull data from a mysql database
<?
$db_name = "php";
$db_user = "testphp";
$db_pass = "test";
$connection = mysql_connect("localhost", "$db_user", "$db_pass") or die("Couldn't");
$db = mysql_select_db($db_name, $connection) or die("Couldn't Select Database");
$query = "select * from phptest where name = 'Test'";
$result = mysql_query($query, $connection)or die ("Couln't execute query.");
while ($row = mysql_fetch_array($result)) {
$id = $row['id'];
$name = $row['name'];
$text = "$id $name <br>";
echo $text;
I have the following form
<HTML>
<HEAD>
<TITLE>A simple form</TITLE>
</HEAD>
<BODY>
<FORM method="POST" action="form.php">
<INPUT type="text" name="mytextbox" size="20"><BR>
<INPUT type="submit" name="mybutton" value="Click me!">
</FORM>
</BODY>
</HTML>
What is the best way to allow me to enter data into the form and have it display the data?
Also, other than webmonkey tuts, any suggestions on docs or tuts for using forms with php and mysql?