Re: Redirect on same page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Avi,

Create a Session varialble in your login page. Nameit as targetPage, store the requested page url in targetPage verialbe

For example:-
//in the link of portfilio.php link like this way <a href="portfilio.php?targetPage=portfilio.php">Porftilio</a>

//in login.php page grab that veriable's value

<?php
session_start();
$targetPage=$_request['targetPage'];


and do the code...........
if login is true then

header(location:$targetPage);


Regards & Thank You,


Suman K. Rai
Cell: +977 98040 25616
rai.suman@xxxxxxxxx | sumanrai1980@xxxxxxxxx
www.raisuman.myplace.com


--- On Thu, 1/22/09, arvindsri123 <arvindsri123@xxxxxxxxx> wrote:

From: arvindsri123 <arvindsri123@xxxxxxxxx>
Subject:  Redirect on same page
To: php-objects@xxxxxxxxxxxxxxx
Date: Thursday, January 22, 2009, 1:34 AM










    
            Hi All,



I need a help, I am developing a site, there some pages need to login

first to see content on that page, i want like if someone want to see

"portfolio page" but for that they need to log in first, and they

redirect to log in page, and when they logged in they must come on the

same page from their they went for log in, i measn in this case after

log in they should see "portfolio page" not home page or any other page...



I have tried to explain what i want to implement on my site.



If u still want to know anything please ask to me..



Thanks,

Avi




      

    
    
	
	 
	
	








	


	
	


      

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux