redirection and current page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Milan
Forum Commoner
Posts: 97
Joined: Wed May 17, 2006 6:08 pm

redirection and current page

Post by Milan »

i have this

Code: Select all

$MM_redirectLoginSuccess = "index2.php?lgdin=ok";
How can i replace index2.php with current page? What i am trying to do is alow user to login from any page on the website and then be retuned to the same page and not be thrown back to index.

thanks!
User avatar
phpmash
Forum Newbie
Posts: 24
Joined: Mon Oct 31, 2005 6:41 am
Location: Kerala,India
Contact:

$_SERVER['PHP_SELF']

Post by phpmash »

I think this is enough for your solution
$MM_redirectLoginSuccess = $_SERVER['PHP_SELF']."?lgdin=ok";
Keep in touch
:roll:
Milan
Forum Commoner
Posts: 97
Joined: Wed May 17, 2006 6:08 pm

Post by Milan »

did the job!
thanks!
Post Reply