close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Quote form

Thread began 8/14/2014 9:34 am by saf01 | Last modified 8/19/2014 2:53 pm by saf01 | 2605 views | 18 replies

saf01

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

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...