Quote form
Hi,
I made a form with several fields, when submitted, displays what you submitted on the next screen - this is the form's action php page.
This works fine. Now the issue is this:
I want to make the form also submit values entered into a database (the database is created already). When I add MYSQLi insert record behaviour to the form and change the form's action page to itself, then change the insert record gotopage to the actual action php page, the quote values don't appear on the screen, but the form values are entered into the database. If I change the form's action to the actual action php page and then leave blank the insert record gotoPage, then the values are displayed on the action page but no values are added to the database.
If I add the insert record behaviour to the actual action page, it works, but everytime I refresh that page it adds new values to the database.
On the action page, Im using the following code to show values on screen:
<?php
foreach ($_POST as $key => $value) {
$$key = $value;
}
If (empty ($value1)) {
die( 'Error !' );
}
If (empty ($value2)) {
$value2 = "value2";
}
If (empty ($value3)) {
$value3 = "value3";
}
?>
Please can you tell me what's the best way to show values on the screen and insert them into the database.
Thanks