Icy Phoenix

     
 

[SOLVED] Login And Redirect To Current Page

[SOLVED] Login And Redirect To Current Page

Article
Reply with quote    Download Post  
Post Login And Redirect To Current Page 
 
after the login, it redirects you to forum.php


I would want that redirect to current page before login.

I have found this code for the login.php, but I think it is for phpbb2


Spoiler: [ Show ]



I found this similar topic, but I cannot find a solution...
www.icyphoenix.com/viewtopic.php?f=35&t=598



 
Gianni PB - View user's profile Send private message  
Gianni PB [ Tue 13 Jan, 2009 17:06 ]
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us


[SOLVED] Login And Redirect To Current Page

Comments
Reply with quote    Download Post  
Post Re: Login And Redirect To Current Page 
 
I found this:

www.phpbbhacks.com/download/550


in particular redirect_outside.txt and redirect_register.txt

I tried, but no good results...



 
Gianni PB - View user's profile Send private message  
Gianni PB [ Fri 06 Feb, 2009 12:20 ]
Reply with quote    Download Post  
Post Re: Login And Redirect To Current Page 
 
Hi

My icy phoenix redirects to the current page after login now.... sorry am I miss understanding you question...



 
DWho - View user's profile Send private message  
DWho [ Fri 06 Feb, 2009 15:39 ]
Reply with quote    Download Post  
Post Re: Login And Redirect To Current Page 
 
look at: http://www.pugliabaila.it/discograf...compilation.php

if you login there, you'll be redirect to index.php



 
Last edited by Gianni PB on Thu 28 Jan, 2010 11:39; edited 1 time in total 
Gianni PB - View user's profile Send private message  
Gianni PB [ Fri 06 Feb, 2009 15:59 ]
Reply with quote    Download Post  
Post Re: Login And Redirect To Current Page 
 
Any ideas?



 
Gianni PB - View user's profile Send private message  
Gianni PB [ Sun 13 Dec, 2009 11:47 ]
Reply with quote    Download Post  
Post Re: Login And Redirect To Current Page 
 
Hey Gianni

take a look at this codelines:

Code: [Download] [Hide] [Select]
if ( !$userdata['session_logged_in'] )
{
    redirect(append_sid(LOGIN_MG . '?redirect=YOUR_SITE.' . PHP_EXT, true));
}


with this code you can set the page after login



 
KugeLSichA - View user's profile Send private message  
KugeLSichA [ Sun 13 Dec, 2009 21:36 ]
Reply with quote    Download Post  
Post Re: Login And Redirect To Current Page 
 
Where can I put it?



 
Gianni PB - View user's profile Send private message  
Gianni PB [ Thu 28 Jan, 2010 11:45 ]
Reply with quote    Download Post  
Post Re: Login And Redirect To Current Page 
 
I don't know if this is the best solution, but:

Code: [Download] [Hide] [Select]
echo "<a href='" . $_SERVER['PHP_SELF'] . "?&\$ascolta_login=true'><font size=\'5\'>Ascolta Album!</font></a><br>";
if($_GET['$ascolta_login'] && !$userdata['session_logged_in'])
        redirect(append_sid(LOGIN_MG . '?redirect=' . $_SERVER['PHP_SELF'], true));



and it works...



 
Gianni PB - View user's profile Send private message  
Gianni PB [ Thu 18 Feb, 2010 23:51 ]
Display posts from previous:    

HideWas this topic useful?

Post new topic  Reply to topic  Page 1 of 1