Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   redirect question (https://www.warriorforum.com/programming/586349-redirect-question.html)

Boudewijn 24th April 2012 12:39 AM

redirect question
 
Hi,

I am building a site right now and need to redirect users after login.
For the logging procedure I use s2member framework (the free version).

After the user logs in I want him/her to redirected to another page.
Any ideas how I can get that working are more than welcome.

TIA

Mirque 24th April 2012 01:31 AM

Re: redirect question
 
To redirect a member into a specifique page, you must write this into the top of your page php

PHP Code:

<?php

header
('Location: yournewpageafterlogin.php');

?>

;)

Anditya 24th April 2012 02:28 AM

Re: redirect question
 
Hmmm...

1) User who already registered MUST have special permission set on DB for security issue.

2) User login with their Username & Password & MUST VALID before go to members area.

Code:

if(){header('member.php');}
else{header('login.php');}

Regards,
Arya Anditya

Earnie Boyd 24th April 2012 09:06 AM

Re: redirect question
 
Quote:

Originally Posted by Anditya (Post 6109829)
Hmmm...

1) User who already registered MUST have special permission set on DB for security issue.

2) User login with their Username & Password & MUST VALID before go to members area.

Code:

if(){header('member.php');}
else{header('login.php');}

Regards,
Arya Anditya

Arya: FYI, when wrapping the code with the markdown CODE or PHP tags the variables with $VARIABLE are erased by the software.

Boudewijn 25th April 2012 09:30 AM

Re: redirect question
 
It seems that s2member does take care of redirection. so that problem is solved (for now). I still have some other issues to solve first, that is another thread.


All times are GMT -6. The time now is 12:36 AM.