I have a 5-step (5 page) process in which users must answer various questions. Each
page passes along the data to the next page, at the same time capturing the data from
the previous page and passing that along too.
To capture all the data submitted previously, I have the following code:
$a = "?";
$url = "";
while(list($key, $value) = each($HTTP_POST_VARS))
{
$url .= "$a$key=" . htmlspecialchars(addslashes($value));
$a = "&";
}
while(list($key, $value) = each($HTTP_GET_VARS))
{
$url .= "$a$key=" . htmlspecialchars(addslashes($value));
$a = "&";
}
Each page then submits it's own form to "nextpage.php<? $url ?>"; I'm trying to
simply pass along everything that has already been submitted, via GET or POST.
The problem is that I noticed if the character '#' is part of a value for a GET
variable, it breaks the whole string. Everything after the '#' is lost.
How can I get around this? Is this something I must simply check for and strip out?
What other characters must I worry about? As you can see, I'm already putting
everything through htmlspecialchars() and addslashes().
Thanks
--
: Joseph Szobody :
"Computers are like airconditioners: They stop working properly if you open windows."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php