Author Topic: Simple redirect question :)  (Read 2969 times)

0 Members and 1 Guest are viewing this topic.

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Simple redirect question :)
« on: July 09, 2006, 12:58:02 PM »
Hi all,

i hope someone can help me on that because i cant do it by myself.

I want the user (after logging in) to be redirected to a custom template - nothing else, but that shoud happen only when he logges in, for example:

1. user accesses homepage "www.XXX.com"
2. user puts his name and password into the fields, and clicks on "login"
3. user is being redirected to "www.XXX.com/index.php?template=XXX"
4. user is clicking on "home", (e.g. www.XXX.com), and sees the regular page (not the template)

can anyone understand what i'am trieng to do? :)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Simple redirect question :)
« Reply #1 on: July 09, 2006, 01:10:48 PM »
You can try insert in login.php below
Code: [Select]
  if ($site_sess->login($user_name, $user_password, $auto_login)) {
This:
Code: [Select]
    redirect("www.XXX.com/index.php?template=XXX");
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: Simple redirect question :)
« Reply #2 on: July 19, 2006, 02:59:33 PM »
works, thanks :)