Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.