Form Redirect - Url variables

Hello everyone,

I want to add a form (“login1”) that does a post to a .php which in turn does a GET 301 redirect to a “login2” with a custom url composed by http://www.mywebsite/login2?user=“postedusername”&credential=“postedcredential”

So far I have the html with a POST to a php file.

I’ve got the redirect so far:

header (‘Location: http://www.mywebsite/login2/…’);

<?[/php] Now how do I get the posted information to be added to the url? I''ve searched all day for this, but I can't seem to find the right answers, if you could just point me to the right direction I would appreciate. Thank you

I’m trying


$url = “login2.php?user=$username&pass=$password”;
$username = $_POST [“username”];
$password = $_POST [“password”];
header (“Location: $url”);


But when I get redirected to the url it just shows

Why aren’t the posted values on the form showing up on the link?

Hey, just wanted to say that I solved the problem, just did

$url = “login2.php?user=$_POST[username]”

Sponsor our Newsletter | Privacy Policy | Terms of Service