Results 1 to 7 of 7

Thread: Login Page

  1. #1
    Join Date
    Apr 2004
    Location
    Midlands UK
    Age
    58
    Posts
    322

    Default

    Hi

    When a member successfully logs in they are taken to www.mydomain.com/admin/index.php I would like to change that so that they are taken to another page ie www.mydomain.com/admin/welcome.php. I have created the welcome page which will basically be a welcome you are logged in page. But where do I change the path to point to this page on a successfull login.

    Thanks

    Lasor

  2. #2
    Join Date
    Dec 2003
    Location
    Costa Rica
    Posts
    63

    Default

    Why don't you just change the name of your new page to index.php and make sure to include the 2 php codes on the old index?

    The function that is called to ask people to log in is called from the first command on the index.php page:

    include("../include/common.php");
    loginCheck('User');
    include("$config[template_path]/admin_top.html");

    This loginCheck function is the first function on the main.php page inside the include folder. I don't see any page where it redirects to, so I imagine it is only returning to the default page which would have to be called index.php in any case.

    It's possible you could include a redirect in this function, but you may find that there are other pages and scripts that use this function and you would have to change those as well.

  3. #3
    Join Date
    Apr 2004
    Location
    Midlands UK
    Age
    58
    Posts
    322

    Default

    Thanks for your response. Could anybody tell me what to add and where to add it !! in respect of a redirect command. Once a user succsessfully logs in I want to divert them to a welcome page.

    Also is it possible to direct them to a certain page depending on wether they are logged in as a member or agent.

    For instance It would be good if when for example an agent logs in they are taken to a welcome page that explains their access rights and features and the same for the user.

    Failing this just a straight forward redirect command to a welcome page would be helpfull

    Thanx

    Lasor

  4. #4
    Join Date
    Sep 2004
    Age
    41
    Posts
    231

    Exclamation i am activly looking and in dire need

    of a solution to this as well. it does not make since that a member will be put on the admin page. they should be directed back to the front page once they are logged in. or yes any other welcome members page.

  5. #5
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default

    I created a seperate login page with a link from the main menu. If the user is a member it goes back to the welcome page, if an agent it goes to the admin page. This can be changed bt changing the redirects. Just make a new page with this code and make a link on the main menu.

    <?php
    include("include/common.php");
    loginCheckVisitor('user');

    if ($isAgent == "yes")
    {$url = "Enter URL for agents";
    $delay = "0";
    echo '<meta http-equiv="refresh" content="'.$delay.';url='.$url.'">';
    }

    if ($isAgent != "yes")
    {$url = "Enter url for users";
    $delay = "0";
    echo '<meta http-equiv="refresh" content="'.$delay.';url='.$url.'">';
    }
    ?>

  6. #6
    Join Date
    Sep 2004
    Age
    41
    Posts
    231

    Post awesome

    awesome thanks. i just fixed my front page login script so i will update that on the post here it is here too though

    <?
    /* Caleb's Login Script v1.3 */
    if($userID == "")
    {
    echo("<form action=\"$config[baseurl]/admin/index.php\" method=\"post\">");
    echo("Login Name: <input type=\"text\" name=\"user_name\">");
    echo("Password: <input type=\"password\" name=\"user_pass\">");
    echo("<input type=\"submit\" value=\"Log In\"></form>");
    echo("<a href=\"$config[baseurl]/members/member_signup.php\">Sign Up Now!</a>");
    }
    else
    {
    echo("Welcome $username!<br />");
    echo("<a href=\"$config[baseurl]/members/logout.php\">Log Out!</a>");
    }
    if ($isAgent == "yes")
    {
    echo ("<br /><a href=\"$config[baseurl]/admin\">Agent Panel!</a>");
    }
    ?>

  7. #7
    Join Date
    Sep 2004
    Location
    Jackson, MS
    Posts
    447

    Default

    How would I get Caleb's script to forward the user to listingbrowse.php if they are a member?

    I have this:
    PHP Code:
    echo("<font size=\"2\">Welcome</font><br> <b>$username!</b><br />");
    echo(
    "<a href=\"$config[baseurl]/members/logout.php\">Log Out!</a>");
    }
    if (
    $isAgent == "yes")
    {
    echo (
    "<br /><a href=\"$config[baseurl]/admin\">Agent Panel!</a>");
    }
    if (
    $isAgent != "yes")
    {
    echo (
    "<br /><a href=\"$config[baseurl]/listing_browse.php\">View Comics!</a>");


Similar Threads

  1. image only next page - SOLVED
    By Vidman in forum HELP (CLOSED)
    Replies: 2
    Last Post: 06-24-2004, 11:27 AM
  2. Login Page Mod
    By nophotok in forum HELP (CLOSED)
    Replies: 2
    Last Post: 06-04-2004, 03:53 PM
  3. PDF printouts
    By jeffremiller in forum General Discussion
    Replies: 33
    Last Post: 04-08-2004, 02:15 PM
  4. I Need A New User View Page...
    By rspi in forum Work
    Replies: 0
    Last Post: 04-05-2004, 01:17 AM
  5. login from any page - SOLVED
    By unity in forum HELP (CLOSED)
    Replies: 3
    Last Post: 12-08-2003, 05:53 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •