Yeah, but the problem is that you cannot have an include that sends a header after HTML output, at least not without output buffering.

    anakadote;10946151 wrote:

    It's saying that on line 28 of commentonticker.inc.php you're outputting something to the screen

    Note quite - line 28 of commentonticker.inc.php is where the HTTP headers are attempting to be sent.

    Line number 204 of index.php, on the other hand, seems to be outputting data before this happens.

      there is nothing on 204 that can prevent it... i guess i can try using ob_start() and ob_end_flush() and see what happens just for fun.

        Can you show us a few lines above and below line #204 of index.php?

          <?php if($pagenumber=='030103'){ ?>
          <p>
          Use the following input(s) to delete a user from the Application Administration database.<br />
          1. Fill in the users id into the <b>User ID</b> labeled input.<br />
          2. Double check that the information you have entered is correct and submit the form.<br  />
          <br /> <br />
          <font color="red"><b>Warning! Once deleted a User is gone forever...</b> Make sure to enter a valid <b>ID</b>.</font>   
          </p><br /> <form action="<?php echo $PHP_SELF; ?>" method="post"> <fieldset> <legend>Delete User</legend> <div id="form_tag_container" onMouseOver="this.className='Highlight'" onMouseOut="this.className='Normal'"> <label>User ID:</label> <input name="input_userid" value="" width="2" maxlength="2" type="text" /> </div> <input id="button" name="input_deleteuser" value="Delete" type="submit" /> </fieldset> </form> <?php } // delete user from database ?> <?php if($pagenumber=='030101' || $pagenumber=='030102' || $pagenumber=='030103'){ ?> //204

          that include() or require_once() was on line 452.

            You've got whitespace between the '?>' and '<?php' tags, thus you're outputting data at that point.

              i dont get it I allready echo pagetitle in title tag, why does it specifically pick 204? I mean what that whitespace has to do with the include, none of this code is processed unless pagenumber==correct number therefore why 204 ....

              or are you talking about the line break white space

                igorek;10946217 wrote:

                or are you talking about the line break white space

                Yes, that's what I was referring to. Specifically, the line breaks between the '?>' tag and the next '<?php' tag here:

                // delete user from database ?>      
                
                <?php if($pagenumber=='030101'

                  the problem with that is it happens before twice on line 134 and 97 same type of line break

                    if that was the case then why would it not say index.php:97 when it happens first since the interpreter reads the script from top to bottom i don't think its line breaks there is something else... and in fact if this was the case doesn't it ignore html, <?php ?> where to stop reading and where to continue.

                      igorek wrote:

                      i don't think its line breaks there is something else

                      Unless that line break is wrapped inside another if() statement that isn't being called at the time, then it is the line breaks. PHP's telling you that there is output before that line, and the only output I saw were the line breaks.

                      igorek wrote:

                      doesn't it ignore html, <?php ?> where to stop reading and where to continue.

                      It doesn't "ignore" html, it outputs it. And yes, any whitespace inside of <?php .. ?> tags doesn't matter. But the line breaks in this case are outside of those tags, thus they are being sent as output (causing HTTP headers to be sent at that point).

                        removed line breaks;

                        Warning: Cannot modify header information - headers already sent by (output started at D:\Hosting\5353130\html\003\index.php:419) in D:\Hosting\5353130\html\003\includes\commentonticker.inc.php on line 16

                        417.	  </table>
                        418.     <?php } // if pn=030201 ?><!-- COMMENT IF! -->
                        419. <?php if($pagenumber=='030202'){?>
                        420. <p>
                        421. Use the following input(s) to email a comment on an <b>allready</b> opened signal.<br />
                        422. 1. Insert the signal <b>ID</b> into the input labeled ID that you want to comment.<br />
                        423. 2. Insert the comment you want to send out about that signal into the input labeled 424. <i>Comment</i>.<br  />
                        425. <br /> <br />
                        
                        

                        sorry just interesting if i can get it to work i am going to sleep for now have been up since 9am its 2:30 am next day lol

                          Same issue... you escape out of PHP mode and then output an HTML comment plus a line break.

                          This is one of the reasons I strongly recommend people to separate out all (or almost all) HTML from their PHP scripts. You're going to have to go through your script and remove any line breaks, comments, spaces, etc. that are outside of the <?php .. ?> tags.

                          Why do you escape out of PHP mode so often anyway? It does nothing but clutter up the code and, as you can see, cause errors.

                            i am seperating it, then when i finish cms i will break it up in the db. but yea this worked thank you very much for your time and help.

                              Write a Reply...