Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default Need help getting this feature to work.

    Okay i was following the Techtuts user system but decided to edit it Loads! but then i got into a problem i wanted the page to open in a new page instead of redirecting to the old one. Which was a success. then on the new page at the top i put as they say to..
    Code:
    <? 
       ob_start(); 
       include("config.php"); 
       if ($logged[username]) 
       { 
          echo("You are logged in"); 
       } 
       else 
       { 
          echo("You are not logged in"); 
       } 
    ?>
    Then i add my coded template below. (its in html)

    Then when i login and go to this page i get the messgae 'Your are logged in' then the template shows.

    But if i got to that page without loging in i get 'you are not logged in' but the template stil shows.

    So.. this is where you lot come in.

    I want it so that it doesnt show 'you are logged in' i want it just to show the template and if your not logged in i dont want it to show the template, just the message 'you are not logged in'.

    I really need help on this a.s.a.p

    +rep for anyone that trys Thanks

    Chris
    Last edited by ClubTime; 03-09-2006 at 12:56 PM.

  2. #2
    Join Date
    Nov 2004
    Location
    HabboWeb FM Offices
    Posts
    3,019
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <? 
       ob_start
    (); 
       include(
    "config.php"); 
       if (
    $logged[username]) 
       { 
          echo(
    "You are logged in"); 
       } 
       else 
       { 
          echo(
    "You are not logged in"); 
       } 
    ?>
    Enter under here, it shows it anyway

    Try this:

    PHP Code:
    <?PHP
      ob_start
    ();
    include(
    "config");
       if (
    $logged[username]) 
       { 
    ?>
    Site here
    <?PHP
    } else {
    echo (
    "You are not logged in");
    }
    ?>
    Last edited by :Blob; 03-09-2006 at 01:12 PM.

  3. #3
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default

    Thanks alot wokred like a charm. Except there was one error lol you put

    inlcude("config");

    instead of include("config.php");

    Thanks alot +rep

    EDIT: Sorry need to spread
    Last edited by ClubTime; 03-09-2006 at 01:22 PM.

  4. #4
    Join Date
    Nov 2004
    Location
    HabboWeb FM Offices
    Posts
    3,019
    Tokens
    0

    Latest Awards:

    Default

    Ahh yes.. i always do that

Posting Permissions

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