danmon Posted June 22, 2007 Share Posted June 22, 2007 Hello all, I've been looking for hours in the php doc to find a function that redirects me to another .php file with parameters. Here is exactly what I want: once the users register on my page I want to verify if the info is ok then go to the congratulation.php page and say thanks "username" for registering on our page. So I'll need to send the username and some other info too to the .php page. I don't want to do it via the html <form> and press a button, I am looking for a simple php function. Thanks Danmon Quote Link to comment https://forums.phpfreaks.com/topic/56699-redirection-function/ Share on other sites More sharing options...
danmon Posted June 22, 2007 Author Share Posted June 22, 2007 David thanks for your mail but the function header(); isn't good cause u can't send parameters ps: write on the forum Quote Link to comment https://forums.phpfreaks.com/topic/56699-redirection-function/#findComment-280040 Share on other sites More sharing options...
Illusion Posted June 22, 2007 Share Posted June 22, 2007 http_redirect( [string url [, array params [, bool session = FALSE [, int status]]]] ) Quote Link to comment https://forums.phpfreaks.com/topic/56699-redirection-function/#findComment-280043 Share on other sites More sharing options...
php2MySQL Posted June 22, 2007 Share Posted June 22, 2007 You can save the username and other information in session or cookie or you can use: header("Location:congratulation.php?username=". $username .""); or by using meta tag: <META HTTP-EQUIV="Refresh" CONTENT="0;URL=congratulation.php?username=<?= $username?>"> i prefer the first way. Quote Link to comment https://forums.phpfreaks.com/topic/56699-redirection-function/#findComment-280098 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.