problem with & in address bar string -can't get var
Posted: Mon Jun 07, 2004 5:26 pm
OK, I have a form on a page which uses POST to post the results to a CGI script which converts the results in to an e-mail.
I'm steadily learning PHP so eventually will attempt to do this on my own. But it's a CGI script I've been using for many years and I've found it pretty easy to configure.
There are two hidden variables that I set in this form - one is to set the location of a thanks page, once the data has been sent, and the other is the location of an error page.
Now what I'm trying to do is when someone submits the form, they go to the URL http://www.domain.com/thanks.php?var1=w ... 2=whatever
Unfortunately, when the HTML is decoded by the browser the & in the URL string is getting replaced by &
This means when the browser is redirected, it comes through into the address bar as
http://www.domain.com/thanks.php?var1=w ... 2=whatever
On the thanks.php page I'm trying to test the value of var2 using the switch and case functions, and it doesn't seem to be working.
It just displays the default: value I enter for the switch function.
Is there a way for me to do this?
Thanks in advance
I'm steadily learning PHP so eventually will attempt to do this on my own. But it's a CGI script I've been using for many years and I've found it pretty easy to configure.
There are two hidden variables that I set in this form - one is to set the location of a thanks page, once the data has been sent, and the other is the location of an error page.
Now what I'm trying to do is when someone submits the form, they go to the URL http://www.domain.com/thanks.php?var1=w ... 2=whatever
Unfortunately, when the HTML is decoded by the browser the & in the URL string is getting replaced by &
This means when the browser is redirected, it comes through into the address bar as
http://www.domain.com/thanks.php?var1=w ... 2=whatever
On the thanks.php page I'm trying to test the value of var2 using the switch and case functions, and it doesn't seem to be working.
It just displays the default: value I enter for the switch function.
Is there a way for me to do this?
Thanks in advance