Don't you mean
Heh, may be wrong, probably am.
Code Select
<?
if(!isset($_POST['text']))
{
print "<form action='' method'post'>"; // changed this line
print "<input type='text' name='text'>";
print "<input type='submit'>";
print "</form>";
}
else
{
$text = mysql_escape_string($_POST['text']);
$dbconn = mysql_connect("localhost");
mysql_query("INSERT INTO `table` (`field1`) VALUES ('$text')", $dbconn);
mysql_close($dbconn);
print "Updated if there weren't any errors";
}
}
Heh, may be wrong, probably am.