![]() |
Simple PHP script need help
Hi all,
I have a redirection problem which need some php expert to help. I have a php script in my server and a lot of webmasters point to this script. It's like: http://www.doamin.com/top.php?username But I need to change it to another script, I want to change it to something like: http://www.doamin.com/in.php?id=username Can anybody teach me to to write a redirect script for top.php? So that all request for top.php will forward to in.php and also keeep the "username" variable. Thanks a lot. Max |
Top.php should contain a line of code that checks for a username and then does some action based on the username being present or not. I forget what the variable is, I think it's $QUERY_STRING but I'm not entirely sure. Look in the script and you'll see what I mean, it should look something like this:
if (isset($QUERY_STRING)) { [do some stuff here] } else { [do something else] } Simply replace all the stuff it would normally do with: $username = $QUERY_STRING; header("Location: in.php?id=$username"); If you know a little PHP you should be able to figure it out... it's kinda hard to explain without seeing the original top.php code. ------------------ Plenty of wheat to go around. |
All times are GMT -7. The time now is 03:56 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123