Jump to content

URL Redirect with PHP variable


jackr1909

Recommended Posts

hi,

 

i was wondering if i could automattically redirect a page to another page directly based on a PHP variable like so:

 

<?php

header("Location: http://www.mywebsite.com/<?php echo $_POST["username"]; ?>.php");

?>

 

OR

 

<?php

header("Location: http://www.mywebsite.com/profile.php+action=<?php echo $_POST["username"]; ?>;

?>

 

this page already exists. This is already protected.

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/233145-url-redirect-with-php-variable/
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.