Posting variable in url
| From: | Frank Tudor | Date: | Wed, 29 Oct 2003 16:24:59 +0000 |
| Subject: | Posting variable in url | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-168017@lists.php.net to get a copy of this message | ||
I have a redirect that if conditions are right it will pass the
user to a new page via $_POST.
so for instance the redirect looks like this:
header("Location:
more_registration.php?username=".$_POST["username"]."&email=".$_POST["email"]);
the url will look like this:
http://ftudor/test/more_registration.php?username=1234&email=a@a.com
the form componement on the new page looks like this:
<form method="post" action="<?php echo $PHP_SELF; ?>">
<input name="username" type="hidden" value="<?php echo
$_GET['username']; ?>" size="15">
<input name="email" type="hidden" value="<?php echo
$_GET['email']; ?>" size="15">
</form>
I am posting variables in the url and on this next page more
form stuff awaits the user.
If a user submits incorrect stuff in the form is posts to
itself. The url holds the same variables that were pass through
the redirect.
My concern is that if a variable got altered in the URL by
misstake or on purpose it would post to the refreshed page and
screw everything up.
Anyone run into something like this?
Frank
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/