Results 1 to 5 of 5

Thread: Login Help

  1. #1
    Join Date
    Nov 2005
    Location
    Australia
    Posts
    1,086
    Tokens
    111

    Latest Awards:

    Default Login Help

    Hey,

    I am in need a little bit of help. I am trying to set up a techtuts usersystem. I use the following code to put the username and login form fields into my members iframe.

    PHP Code:
    <?
       
    include("login.php");
    ?>
    This is the part from the login.php that refreshs the login

    PHP Code:
    setcookie("id"$user[id],time()+(60*60*24*5), "/""");
    setcookie("pass"$user[password],time()+(60*60*24*5), "/""");
    // the above lines set 2 cookies. 1 with the user's id and another with his/her password.  
    echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://mydomain.com\"/>Thank You! You will be redirected");
    // modify the above line...add in your site url instead of yoursite.com 
    When I try:

    PHP Code:
    setcookie("id"$user[id],time()+(60*60*24*5), "/""");
    setcookie("pass"$user[password],time()+(60*60*24*5), "/""");
    // the above lines set 2 cookies. 1 with the user's id and another with his/her password.  
    echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://mydomain.com\"/>Thank You! You will be redirected");
    // modify the above line...add in your site url instead of yoursite.com 
    It loads up my index.php in the iframe.

    When I put:

    PHP Code:
    setcookie("id"$user[id],time()+(60*60*24*5), "/""");
    setcookie("pass"$user[password],time()+(60*60*24*5), "/""");
    // the above lines set 2 cookies. 1 with the user's id and another with his/her password.  
    echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://mydomain.com/login.php\"/>Thank You! You will be redirected");
    // modify the above line...add in your site url instead of yoursite.com 
    It makes the links:

    HTML Code:
    www.mydomain.com/login.php/page1.php
    HTML Code:
    www.mydomain.com/login.php/page2.php
    HTML Code:
    www.mydomain.com/login.php/page3.php
    It also makes me sign in twice before it loads the links.

    I had a techtuts usersystem on my old site ages ago, just can't remember what to put in.

    Thanks in advanced.


  2. #2
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    1,290

    Latest Awards:

    Default

    The code your using makes it refresh/redirect to login.php, i dont know why your doing that
    Last edited by Robbie; 25-02-2007 at 03:49 PM.

  3. #3
    Join Date
    Nov 2005
    Location
    Australia
    Posts
    1,086
    Tokens
    111

    Latest Awards:

    Default

    Quote Originally Posted by RobbieGray View Post
    The code your using makes it refresh/redirect to login.php, i dont know why your doing that
    Coz I thought I did that on my old site. If I just put my domain in, it loads my index.php (which is my homepage) into the members iframe.


  4. #4
    Join Date
    Nov 2005
    Location
    Australia
    Posts
    1,086
    Tokens
    111

    Latest Awards:

    Default

    Close thread please.


  5. #5
    Join Date
    Sep 2006
    Posts
    2,114
    Tokens
    0

    Latest Awards:

    Default

    just put 'login.php' without your domain. it should then work
    Looking for a good desiner to design a social networking template.

    PM me.

Posting Permissions

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