Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Members Only

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

    Latest Awards:

    Default Members Only

    Accidently exited the window before when I was about to submit so if it is short you can understand why. I am wanting to know if I can put a HTML page in the PHP Usersystem by Techtuts.

    Example one: "Community.php" - My community page.

    HTML Code:
    <html>
    <head>
    <title></title>
    <style type="text/css">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; } 
    A{color:#000000; font-family:veranda; text-decoration:none; }
    A:Visited{color:#000000; font-family:veranda; text-decoration:none; }
    A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>
    </head>
    <body bgcolor="#fefefe">
    <div align="center"><font face="Verdana"><strong>
    <p align="center">
    <img title="" height="66" alt="" src="/images/habbo1.PNG" width="518"></p></strong></font></div>
    <div align="center"><strong>&nbsp;</strong></div><font face="Courier">
    <div align="center">
    <table style="width: 210px; border-collapse: collapse; height: 256px;" bordercolor="#000000" height="256" cellspacing="0" cellpadding="3" width="210" border="0">
    <tbody>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide12.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="jobs.php" target="content">Jobs</a></font></div></td></tr>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide13.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="about.php" target="content">About Us</a></font></div></td></tr>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide14.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="staff.php" target="content">Staff</a></font></div></td></tr>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide15.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="comps.php" target="content">Competitions</a></font></div></td></tr>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide16.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="events.php" target="content">Events</a></font></div></td></tr></tbody></table></div>
    <div align="center">&nbsp;</div>
    <div align="center"><font face="Verdana" color="#000000" size="1"><a href="/staffloginpage.php" target="content">Staff login</a></font></div></font>
    <div align="center"><font face="Verdana">&nbsp;</font></div>
    <div align="center"><strong><font face="Verdana">&nbsp;</font></strong></div>
    <div align="center"><font face="Verdana">&nbsp;</font></div>
    </body>
    </html>
    This is the members only PHP code.

    PHP Code:
    <?
       ob_start
    ();
       include(
    "config.php");
       if (
    $logged[username])
       {
          echo(
    "You are logged in");
       }
       else
       {
          echo(
    "You are not logged in");
       }
    ?>
    I tried this:

    PHP Code:
    <?
       ob_start
    ();
       include(
    "config.php");
       if (
    $logged[username])
       {
          echo(
    "<html>
    <head>
    <title></title>
    <style type="
    text/css">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; } 
    A{color:#000000; font-family:veranda; text-decoration:none; }
    A:Visited{color:#000000; font-family:veranda; text-decoration:none; }
    A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>
    </head>
    <body bgcolor="
    #fefefe">
    <div align="center"><font face="Verdana"><strong>
    <
    p align="center">
    <
    img title="" height="66" alt="" src="/images/habbo1.PNG" width="518"></p></strong></font></div>
    <
    div align="center"><strong>&nbsp;</strong></div><font face="Courier">
    <
    div align="center">
    <
    table style="width: 210px; border-collapse: collapse; height: 256px;" bordercolor="#000000" height="256" cellspacing="0" cellpadding="3" width="210" border="0">
    <
    tbody>
    <
    tr>
    <
    td valign="top" width="50%">
    <
    p align="right">
    <
    img title="" height="44" alt="" src="/images/guide12.gif" width="51"></p></td>
    <
    td valign="top" width="50%">
    <
    div><font face="Verdana" size="1">&nbsp;</font></div>
    <
    div><font face="Verdana" size="1"><a href="jobs.php" target="content">Jobs</a></font></div></td></tr>
    <
    tr>
    <
    td valign="top" width="50%">
    <
    p align="right">
    <
    img title="" height="44" alt="" src="/images/guide13.gif" width="51"></p></td>
    <
    td valign="top" width="50%">
    <
    div><font face="Verdana" size="1">&nbsp;</font></div>
    <
    div><font face="Verdana" size="1"><a href="about.php" target="content">About Us</a></font></div></td></tr>
    <
    tr>
    <
    td valign="top" width="50%">
    <
    p align="right">
    <
    img title="" height="44" alt="" src="/images/guide14.gif" width="51"></p></td>
    <
    td valign="top" width="50%">
    <
    div><font face="Verdana" size="1">&nbsp;</font></div>
    <
    div><font face="Verdana" size="1"><a href="staff.php" target="content">Staff</a></font></div></td></tr>
    <
    tr>
    <
    td valign="top" width="50%">
    <
    p align="right">
    <
    img title="" height="44" alt="" src="/images/guide15.gif" width="51"></p></td>
    <
    td valign="top" width="50%">
    <
    div><font face="Verdana" size="1">&nbsp;</font></div>
    <
    div><font face="Verdana" size="1"><a href="comps.php" target="content">Competitions</a></font></div></td></tr>
    <
    tr>
    <
    td valign="top" width="50%">
    <
    p align="right">
    <
    img title="" height="44" alt="" src="/images/guide16.gif" width="51"></p></td>
    <
    td valign="top" width="50%">
    <
    div><font face="Verdana" size="1">&nbsp;</font></div>
    <
    div><font face="Verdana" size="1"><a href="events.php" target="content">Events</a></font></div></td></tr></tbody></table></div>
    <
    div align="center">&nbsp;</div>
    <
    div align="center"><font face="Verdana" color="#000000" size="1"><a href="/staffloginpage.php" target="content">Staff login</a></font></div></font>
    <
    div align="center"><font face="Verdana">&nbsp;</font></div>
    <
    div align="center"><strong><font face="Verdana">&nbsp;</font></strong></div>
    <
    div align="center"><font face="Verdana">&nbsp;</font></div>
    </
    body>
    </
    html>");
       }
       else
       {
          echo("
    You need to sign up to our member system!");
       }
    ?>

    I get this error:

    Parse error: syntax error, unexpected T_STRING in /home/rob4/public_html/community.php on line 9
    So am I able to use normal HTML or am I gonna have to use PHP in the echos?


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

    Latest Awards:

    Default

    USE THIS

    PHP Code:
    <?
    ob_start
    ();
    include(
    "config.php");
    if(
    $logged[username] {
    echo(
    "<html>
    <head>
    <title></title>
    <style type=\"text/css\">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; } 
    A{color:#000000; font-family:veranda; text-decoration:none; }
    A:Visited{color:#000000; font-family:veranda; text-decoration:none; }
    A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>
    </head>
    <body bgcolor=\"#fefefe\">
    <div align=\"center\"><font face=\"Verdana\"><strong>
    <p align=\"center\">
    <img title=\"\" height=\"66\" alt=\"\" src=\"/images/habbo1.PNG\" width=\"518\"></p></strong></font></div>
    <div align=\"center\"><strong>&nbsp;</strong></div><font face=\"Courier\">
    <div align=\"center\">
    <table style=\"width: 210px; border-collapse: collapse; height: 256px;\" bordercolor=\"#000000\" height=\"256\" cellspacing=\"0\" cellpadding=\"3\" width=\"210\" border=\"0\">
    <tbody>
    <tr>
    <td valign=\"top\" width=\"50%\">
    <p align=\"right\">
    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide12.gif\" width=\"51\"></p></td>
    <td valign=\"top\" width=\"50%\">
    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
    <div><font face=\"Verdana\" size=\"1\"><a href=\"jobs.php\" target=\"content\">Jobs</a></font></div></td></tr>
    <tr>
    <td valign=\"top\" width=\"50%\">
    <p align=\"right\">
    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide13.gif\" width=\"51\"></p></td>
    <td valign=\"top\" width=\"50%\">
    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
    <div><font face=\"Verdana\" size=\"1\"><a href=\"about.php\" target=\"content\">About Us</a></font></div></td></tr>
    <tr>
    <td valign=\"top\" width=\"50%\">
    <p align=\"right\">
    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide14.gif\" width=\"51\"></p></td>
    <td valign=\"top\" width=\"50%\">
    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
    <div><font face=\"Verdana\" size=\"1\"><a href=\"staff.php\" target=\"content\">Staff</a></font></div></td></tr>
    <tr>
    <td valign=\"top\" width=\"50%\">
    <p align=\"right\">
    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide15.gif\" width=\"51\"></p></td>
    <td valign=\"top\" width=\"50%\">
    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
    <div><font face=\"Verdana\" size=\"1\"><a href=\"comps.php\" target=\"content\">Competitions</a></font></div></td></tr>
    <tr>
    <td valign=\"top\" width=\"50%\">
    <p align=\"right\">
    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide16.gif\" width=\"51\"></p></td>
    <td valign=\"top\" width=\"50%\">
    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
    <div><font face=\"Verdana\" size=\"1\"><a href=\"events.php\" target=\"content\">Events</a></font></div></td></tr></tbody></table></div>
    <div align=\"center\">&nbsp;</div>
    <div align=\"center\"><font face=\"Verdana\" color=\"#000000\" size=\"1\"><a href=\"/staffloginpage.php\" target=\"content\">Staff login</a></font></div></font>
    <div align=\"center\"><font face=\"Verdana\">&nbsp;</font></div>
    <div align=\"center\"><strong><font face=\"Verdana\">&nbsp;</font></strong></div>
    <div align=\"center\"><font face=\"Verdana\">&nbsp;</font></div>
    </body>
    </html>"
    );
    }
    else
    {
    echo(
    "Not logged in");
    }
    ?>
    Inside echo(""); you have to replace "'s with /"

  3. #3
    Join Date
    Nov 2006
    Location
    Cheshire.
    Posts
    730
    Tokens
    250

    Default

    You can't have a quotation mark in another quotation mark.
    You have to use an apostrophe

    PHP Code:
    <?
       ob_start
    ();
       include(
    "config.php");
       if (
    $logged[username])
       {
          echo(
    '<html>
    <head>
    <title></title>
    <style type="text/css">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; } 
    A{color:#000000; font-family:veranda; text-decoration:none; }
    A:Visited{color:#000000; font-family:veranda; text-decoration:none; }
    A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>
    </head>
    <body bgcolor="#fefefe">
    <div align="center"><font face="Verdana"><strong>
    <p align="center">
    <img title="" height="66" alt="" src="/images/habbo1.PNG" width="518"></p></strong></font></div>
    <div align="center"><strong>&nbsp;</strong></div><font face="Courier">
    <div align="center">
    <table style="width: 210px; border-collapse: collapse; height: 256px;" bordercolor="#000000" height="256" cellspacing="0" cellpadding="3" width="210" border="0">
    <tbody>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide12.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="jobs.php" target="content">Jobs</a></font></div></td></tr>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide13.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="about.php" target="content">About Us</a></font></div></td></tr>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide14.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="staff.php" target="content">Staff</a></font></div></td></tr>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide15.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="comps.php" target="content">Competitions</a></font></div></td></tr>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide16.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="events.php" target="content">Events</a></font></div></td></tr></tbody></table></div>
    <div align="center">&nbsp;</div>
    <div align="center"><font face="Verdana" color="#000000" size="1"><a href="/staffloginpage.php" target="content">Staff login</a></font></div></font>
    <div align="center"><font face="Verdana">&nbsp;</font></div>
    <div align="center"><strong><font face="Verdana">&nbsp;</font></strong></div>
    <div align="center"><font face="Verdana">&nbsp;</font></div>
    </body>
    </html>'
    );
       }
       else
       {
          echo(
    "You need to sign up to our member system!");
       }
    ?>
    That should work?


    Give us an add like!

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

    Latest Awards:

    Default

    Wth are you talking about lol my post is correct

    PHP Code:
    <?
    ob_start
    ();
    include(
    "config.php");
    if(
    $logged[username] {
    echo(
    "<html>
    <head>
    <title></title>
    <style type=\"text/css\">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; } 
    A{color:#000000; font-family:veranda; text-decoration:none; }
    A:Visited{color:#000000; font-family:veranda; text-decoration:none; }
    A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>
    </head>
    <body bgcolor=\"#fefefe\">
    <div align=\"center\"><font face=\"Verdana\"><strong>
    <p align=\"center\">
    <img title=\"\" height=\"66\" alt=\"\" src=\"/images/habbo1.PNG\" width=\"518\"></p></strong></font></div>
    <div align=\"center\"><strong>&nbsp;</strong></div><font face=\"Courier\">
    <div align=\"center\">
    <table style=\"width: 210px; border-collapse: collapse; height: 256px;\" bordercolor=\"#000000\" height=\"256\" cellspacing=\"0\" cellpadding=\"3\" width=\"210\" border=\"0\">
    <tbody>
    <tr>
    <td valign=\"top\" width=\"50%\">
    <p align=\"right\">
    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide12.gif\" width=\"51\"></p></td>
    <td valign=\"top\" width=\"50%\">
    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
    <div><font face=\"Verdana\" size=\"1\"><a href=\"jobs.php\" target=\"content\">Jobs</a></font></div></td></tr>
    <tr>
    <td valign=\"top\" width=\"50%\">
    <p align=\"right\">
    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide13.gif\" width=\"51\"></p></td>
    <td valign=\"top\" width=\"50%\">
    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
    <div><font face=\"Verdana\" size=\"1\"><a href=\"about.php\" target=\"content\">About Us</a></font></div></td></tr>
    <tr>
    <td valign=\"top\" width=\"50%\">
    <p align=\"right\">
    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide14.gif\" width=\"51\"></p></td>
    <td valign=\"top\" width=\"50%\">
    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
    <div><font face=\"Verdana\" size=\"1\"><a href=\"staff.php\" target=\"content\">Staff</a></font></div></td></tr>
    <tr>
    <td valign=\"top\" width=\"50%\">
    <p align=\"right\">
    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide15.gif\" width=\"51\"></p></td>
    <td valign=\"top\" width=\"50%\">
    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
    <div><font face=\"Verdana\" size=\"1\"><a href=\"comps.php\" target=\"content\">Competitions</a></font></div></td></tr>
    <tr>
    <td valign=\"top\" width=\"50%\">
    <p align=\"right\">
    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide16.gif\" width=\"51\"></p></td>
    <td valign=\"top\" width=\"50%\">
    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
    <div><font face=\"Verdana\" size=\"1\"><a href=\"events.php\" target=\"content\">Events</a></font></div></td></tr></tbody></table></div>
    <div align=\"center\">&nbsp;</div>
    <div align=\"center\"><font face=\"Verdana\" color=\"#000000\" size=\"1\"><a href=\"/staffloginpage.php\" target=\"content\">Staff login</a></font></div></font>
    <div align=\"center\"><font face=\"Verdana\">&nbsp;</font></div>
    <div align=\"center\"><strong><font face=\"Verdana\">&nbsp;</font></strong></div>
    <div align=\"center\"><font face=\"Verdana\">&nbsp;</font></div>
    </body>
    </html>"
    );
    }
    else
    {
    echo(
    "Not logged in");
    }
    ?>

    Replace " with /"
    Last edited by Robbie; 25-02-2007 at 05:02 PM.

  5. #5
    Join Date
    Jan 2007
    Location
    West Yorkshire
    Posts
    384
    Tokens
    0

    Default

    PHP Code:
    <?
       ob_start
    ();
       include(
    "config.php");
       if (
    $logged[username])
       {
    ?>
    <head>
    <title></title>
    <style type="text/css">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; } 
    A{color:#000000; font-family:veranda; text-decoration:none; }
    A:Visited{color:#000000; font-family:veranda; text-decoration:none; }
    A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>
    </head>
    <body bgcolor="#fefefe">
    <div align="center"><font face="Verdana"><strong>
    <p align="center">
    <img title="" height="66" alt="" src="/images/habbo1.PNG" width="518"></p></strong></font></div>
    <div align="center"><strong>&nbsp;</strong></div><font face="Courier">
    <div align="center">
    <table style="width: 210px; border-collapse: collapse; height: 256px;" bordercolor="#000000" height="256" cellspacing="0" cellpadding="3" width="210" border="0">
    <tbody>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide12.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="jobs.php" target="content">Jobs</a></font></div></td></tr>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide13.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="about.php" target="content">About Us</a></font></div></td></tr>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide14.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="staff.php" target="content">Staff</a></font></div></td></tr>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide15.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="comps.php" target="content">Competitions</a></font></div></td></tr>
    <tr>
    <td valign="top" width="50%">
    <p align="right">
    <img title="" height="44" alt="" src="/images/guide16.gif" width="51"></p></td>
    <td valign="top" width="50%">
    <div><font face="Verdana" size="1">&nbsp;</font></div>
    <div><font face="Verdana" size="1"><a href="events.php" target="content">Events</a></font></div></td></tr></tbody></table></div>
    <div align="center">&nbsp;</div>
    <div align="center"><font face="Verdana" color="#000000" size="1"><a href="/staffloginpage.php" target="content">Staff login</a></font></div></font>
    <div align="center"><font face="Verdana">&nbsp;</font></div>
    <div align="center"><strong><font face="Verdana">&nbsp;</font></strong></div>
    <div align="center"><font face="Verdana">&nbsp;</font></div>
    </body>
    </html>
    <?php
       
    }
       else
       {
          echo(
    "You need to sign up to our member system!");
       }
    ?>
    Alot easier.

    “two players, two sides.
    one is light, one is dark.”
    - John Locke

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

    Latest Awards:

    Default

    Parse error: syntax error, unexpected T_ECHO in /home/rob4/public_html/community.php on line 5
    Get this.


  7. #7
    Join Date
    Jan 2007
    Location
    West Yorkshire
    Posts
    384
    Tokens
    0

    Default

    Read my post above.

    “two players, two sides.
    one is light, one is dark.”
    - John Locke

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

    Latest Awards:

    Default

    EDITED

    PHP Code:
    <?

    ob_start
    ();

    include(
    "config.php");

    if(
    $logged[username]} {

    echo(
    "<html>

    <head>

    <title></title>

    <style type=\"text/css\">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; } 

    A{color:#000000; font-family:veranda; text-decoration:none; }

    A:Visited{color:#000000; font-family:veranda; text-decoration:none; }

    A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>

    </head>

    <body bgcolor=\"#fefefe\">

    <div align=\"center\"><font face=\"Verdana\"><strong>

    <p align=\"center\">

    <img title=\"\" height=\"66\" alt=\"\" src=\"/images/habbo1.PNG\" width=\"518\"></p></strong></font></div>

    <div align=\"center\"><strong>&nbsp;</strong></div><font face=\"Courier\">

    <div align=\"center\">

    <table style=\"width: 210px; border-collapse: collapse; height: 256px;\" bordercolor=\"#000000\" height=\"256\" cellspacing=\"0\" cellpadding=\"3\" width=\"210\" border=\"0\">

    <tbody>

    <tr>

    <td valign=\"top\" width=\"50%\">

    <p align=\"right\">

    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide12.gif\" width=\"51\"></p></td>

    <td valign=\"top\" width=\"50%\">

    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>

    <div><font face=\"Verdana\" size=\"1\"><a href=\"jobs.php\" target=\"content\">Jobs</a></font></div></td></tr>

    <tr>

    <td valign=\"top\" width=\"50%\">

    <p align=\"right\">

    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide13.gif\" width=\"51\"></p></td>

    <td valign=\"top\" width=\"50%\">

    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>

    <div><font face=\"Verdana\" size=\"1\"><a href=\"about.php\" target=\"content\">About Us</a></font></div></td></tr>

    <tr>

    <td valign=\"top\" width=\"50%\">

    <p align=\"right\">

    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide14.gif\" width=\"51\"></p></td>

    <td valign=\"top\" width=\"50%\">

    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>

    <div><font face=\"Verdana\" size=\"1\"><a href=\"staff.php\" target=\"content\">Staff</a></font></div></td></tr>

    <tr>

    <td valign=\"top\" width=\"50%\">

    <p align=\"right\">

    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide15.gif\" width=\"51\"></p></td>

    <td valign=\"top\" width=\"50%\">

    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>

    <div><font face=\"Verdana\" size=\"1\"><a href=\"comps.php\" target=\"content\">Competitions</a></font></div></td></tr>

    <tr>

    <td valign=\"top\" width=\"50%\">

    <p align=\"right\">

    <img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide16.gif\" width=\"51\"></p></td>

    <td valign=\"top\" width=\"50%\">

    <div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>

    <div><font face=\"Verdana\" size=\"1\"><a href=\"events.php\" target=\"content\">Events</a></font></div></td></tr></tbody></table></div>

    <div align=\"center\">&nbsp;</div>

    <div align=\"center\"><font face=\"Verdana\" color=\"#000000\" size=\"1\"><a href=\"/staffloginpage.php\" target=\"content\">Staff login</a></font></div></font>

    <div align=\"center\"><font face=\"Verdana\">&nbsp;</font></div>

    <div align=\"center\"><strong><font face=\"Verdana\">&nbsp;</font></strong></div>

    <div align=\"center\"><font face=\"Verdana\">&nbsp;</font></div>

    </body>

    </html>"
    );

    }

    else

    {

    echo(
    "Not logged in");

    }

    ?>

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

    Latest Awards:

    Default

    Quote Originally Posted by Th0m4s View Post
    Read my post above.
    Tried yours, it worked. Thanks mate. Care to explain what you did so I can do it to the rest of my pages?

    + rep to all who tried.


  10. #10
    Join Date
    Jan 2007
    Location
    West Yorkshire
    Posts
    384
    Tokens
    0

    Default

    I got rid of the echo tags and closed the php tags then reopened them.

    Eg.

    From:
    PHP Code:
    <?php
    if($_SESSION['hello']){
    echo 
    '<b>Hello</b>';
    }
    ?>
    To:
    PHP Code:
    <?php
    if($_SESSION['hello']{
    ?>
    <b>Hello</b>
    <?php
    }
    ?>

    “two players, two sides.
    one is light, one is dark.”
    - John Locke

Page 1 of 2 12 LastLast

Posting Permissions

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