Jump to content

redirection function


danmon

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/56699-redirection-function/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/56699-redirection-function/#findComment-280098
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.