You cannot call PHP code directly from HTML. The best you can do is:
my_page.php
<?PHP
if( $was_posted )
{
// handle the text they typed
print( "You typed: $blah into that box back there." );
}
else
{
// print straight html
?>
<form action="<?PHP echo $PHP_SELF; ?>">
Type Here:
<input type=text name=blah>
<input type=hidden name=was_posted value="something">
<input type=submit>
</form>
<?PHP
// done printing html
}
?>
... EOF.
You would replace the call to "print" in the first block, to "insert();"
HTH.
--Robert