close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Validate to full URL including parameters

Thread began 6/20/2014 11:40 am by bill173836 | Last modified 6/20/2014 2:13 pm by Jason Byrnes | 760 views | 7 replies |

bill173836

Validate to full URL including parameters

My registration form includes several parameters in the url and I want the url to keep those parameters. The redirect is currently set to:
".(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)) ."?invalid=true . What should I change it to to keep the current url including parameters?

Sign in to reply to this post

Jason ByrnesWebAssist

try this:

".(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)) .(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):"")."?invalid=true

Sign in to reply to this post

bill173836

That didn't work.
Here is the url with parameters:
http://funkymonkeycoupons.com/signup-patron.php?npoLinkName=Cub-Scout-Pack-127&FindNPOSearchButton2=Select+NPO

And here is what the code validated to:
http://funkymonkeycoupons.com/signup-patron.php??invalid=true

I'm attaching the file. Thanks.

Attached Files
signup-patron.php
Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

bill173836

Here you go.

Sign in to reply to this post

Jason ByrnesWebAssist

edit the form action:
action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>"

to pass the URL variables:
action="<?php echo ($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):""));?>"

Sign in to reply to this post

bill173836

That did it but all the parameters were in the url twice now. I left the fail redirect blank on the server behavior and that seems to work ok now. Is there any reason I shouldn't leave it blank? Some reason I'm not aware of?

Sign in to reply to this post

Jason ByrnesWebAssist

i would set it back to the original:

".(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)) ."?invalid=true

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