close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Go TO page on form include

Thread began 6/20/2012 6:21 am by superpac250441 | Last modified 6/20/2012 11:24 am by superpac250441 | 452 views | 4 replies |

superpac250441

Go TO page on form include

I have used framework to include a form on a contact page. The actual form, using formbuilder, is set to go to thankyou.php on clicking the submit. However, what happens is that on submit, it goes to the contact page.

The code in the form:

$GoToPage = "thankyou.php";

Is there something I am missing?

Sign in to reply to this post

Jason ByrnesWebAssist

make sure the forms action uses the following code:

php:
 action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != ""?"?".htmlentities($_SERVER["QUERY_STRING"], ENT_QUOTES):""); ?>"
Sign in to reply to this post

superpac250441

Thanks Jason.

At the moment, the default action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>".

I have to replace it with this as provided by you (thanks):

action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != ""?"?".htmlentities($_SERVER["QUERY_STRING"], ENT_QUOTES):""); ?>"


Is this something that will be fixed in the next update?

Sign in to reply to this post

Jason ByrnesWebAssist

it's not actually a bug.

the initial code dynamically sets the forms action to post to the page name.

The code change i supplied sets the forms action dynamically to the page name, but also includes any query string variables.

You dont always need to, or even want to, pass the query string variables used to load the page, in the case of a plugin page, it is needed.

but really, you should only include querystring variables with the forms action on an as needed basis.

Sign in to reply to this post

superpac250441

Excellent thanks Jason. That solves it for me. I didn't need to do that before for some reason but at least I understand it now as I am using WA framework a lot these days as it makes life simpler when it comes to editing things like forms

Sign in to reply to this post

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...