Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 3 of 3

Thread: PHP Help

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

    Latest Awards:

    Default PHP Help

    I've tried for ages but cant figure out the Error ;l

    Code:
     
    <html>
    <head>
    <style type="text/css">
    a {
    font-size: 10px;
    color: #000000;
    }
    a:link {
    text-decoration: none;
    color: #000000;
    }
    a:visited {
    text-decoration: none;
    color: #000000;
    }
    a:hover {
    text-decoration: underline;
    color: #000000;
    }
    a:active {
    text-decoration: none;
    color: #000000;
    }
    body,td,th,p {
    font-family: Verdana;
    font-size: 10px;
    color: #000000;
    }
    .12 { color: red; }
    .11 { color: navy; }
    .10 { color: ; }
    .9 { color: darkorchid; }
    .8 { color: darkorchid; }
    .7 { color: darkorchid; }
    .6 { color: darkorchid; }
    .5 { color: green; }
    .4 { color: green; }
    .3 { color: green; }
    .2 { color: green; }
    .1 { color: black; }
    input {
     font-family: Tahoma, Arial;
     font-size: 8pt;
     font-weight: bold;
     width: 200;
     color: #000000;
     background-color: #FFFFFF;
     border: 1px solid #000000;
    }
    select {
     background-color: #ffffff;
     font-family: Arial, Helvetica, sans-serif;
     font-size: 8pt;
     color: #000000;
     width: 200;
     border: 1px solid #000000;
    }
    textarea {
    background-color: #ffffff;
     font-family: Arial, Helvetica, sans-serif;
     font-size: 8pt;
     color: #000000;
     width: 200;
     border: 1px solid #000000;
    }
    .everything {
     font-family: Tahoma, Arial;
     font-size: 8pt;
     font-weight: bold;
     width: 200;
     color: #000000;
     background-color: #FFFFFF;
     border: 1px solid #000000;
    }
    </style>
    </head>
    <body bgcolor="#D4E6EA">
    <div align="center">
     <table border="0" cellpadding="0" cellspacing="0" width="509" height="50">
      <tr>
       <td valign="top" colspan="3" height="22">
       <p align="center">
       <img border="0" src="content_top.png" width="509" height="22"></td>
      </tr>
      <tr>
       <td valign="top" background="content_mid.png" width="5">
       &nbsp;</td>
       <td valign="top" width="499" bgcolor="#FFFFFF">
    <?
    ob_start();
    setcookie("id", 2132421,time()+(60*60*24*5), "/", ""); 
    setcookie("pass", loggedout,time()+(60*60*24*5), "/", "");
    echo ("So you have logged out? Why not <a href=\"login.php\">Log back in</a>");
    ?>
    </td>
       <td valign="top" background="content_mid.png" height="21" width="5">
       &nbsp;</td>
      </tr>
      <tr>
       <td valign="top" colspan="3" height="7">
       <img border="0" src="content_bot.png" width="509" height="7"></td>
      </tr>
     </table>
    </div>
    </html>
    Error:

    Code:
     
    Warning: Cannot modify header information - headers already sent by (output started at /home/bobbaw/public_html/values/admin/logout.php:3) in /home/bobbaw/public_html/values/admin/logout.php on line 95
     
    Warning: Cannot modify header information - headers already sent by (output started at /home/bobbaw/public_html/values/admin/logout.php:3) in /home/bobbaw/public_html/values/admin/logout.php on line 96
    So you have logged out? Why not Log back in
    EDIT: works fine without the html in it

    Edited by L&#181;ke (Forum Moderator): Thread Moved From Website Designing. Please post in the correct section next time, Thanks .
    Last edited by Lµke; 13-02-2007 at 11:49 AM.
    Looking for a good desiner to design a social networking template.

    PM me.

  2. #2
    Join Date
    Aug 2004
    Location
    bristol
    Posts
    3,799
    Tokens
    0

    Latest Awards:

    Default

    you need to move ob_start to the top. cookie info is stored in the packet's header, when you start outputting contnet, the header gets sent (therefore you cannot ammend/add to it). by putting ob_start at the top, yuo buffer the output and send it once the server finishes parsing the file (so practically, the header doesn't get sent off.. and you can mess about with it).
    kinda quit.

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

    Latest Awards:

    Default

    thanks it worked +rep
    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
  •