Faqts : Computers : Programming : Languages : PHP : Common Problems : Forms and User Input

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

12 of 20 people (60%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

When i press the submit button i want to send the data to my db and reset my form, i want no confirmation page. How do i do it?

Mar 23rd, 2001 14:53
Ben Udall, Jan-Borge Landro,


The quickest way I can think of, is to have the form call itself:
<?
if ($submit_btn)
{
    // Enter form data into database
}
?>
<form action="dbform.php" method="post">
<input type="text" name="db_data" />
<input type="submit" name="submit_btn" value="Enter" />
</form>