Hi there,

I'm new to using PHP and I've managed to set up a tag wall on a test page. http://www.the-ssh.f2s.com/tagboard/main.php

All is well until after u have submitted your message, the following error appears:

Parse error: parse error in /web/sites/225/musicmany2k/www.the-ssh.f2s.com/tagboard/config.php on line 18

Warning: Cannot add header information - headers already sent by (output started at /web/sites/225/musicmany2k/www.the-ssh.f2s.com/tagboard/config.php:18) in /web/sites/225/musicmany2k/www.the-ssh.f2s.com/tagboard/tagboard.php on line 93

Being new I don't have a clue what it is trying to say!?
Is it something to do with file permissions?

Any help appreciated,

Carl Lewis

    Can't say what the problem is without seeing the code, but it's telling you that it has already sent output to the screen.

    That does not neccessarily mean that it has, it vould mean that it 'thinks' it has.(I know,comps don't think) 🙂

    The error will be somewhere before line 18.
    It could be a misplaced quote. Look for an improperly nested quote in your code .ie 'bob's tools' should be either 'bob\'s tools', or "bob's tools".

    Could be several things, but this one seems to be pretty common error that I make when I am in a hurry.

    Since the page loads with no errors until you give it input, the error will almost certainly be in an 'if' statement or a function.

      • [deleted]

      'Headers already sent' means that you tried to set a cookie or use a header() command AFTER sending some html.

      The way to fix this is to make sure you don't print anything (not even a single space or newline) before sending the cookie or header().

        here's the code:

        <?
        //Tagomatic Tagboard
        //v.2.3.7
        //By Matt Warren

        //Please edit the below variables

        //Anonymous Name
        //This is what the person's name shows up as if they leave the name field blank.
        $anonyname = "???";

        //Anonymous Message
        //If the person does not leave a message, this is what will show up
        $anonymsg = "No message provided..."

        //Site URL
        //This is the address of your site
        $sitelink = "http://www.geocities.com/musicmany2k/main.htm";

        //Display IP
        //Set this to 1 if you want the person's IP displayed. Set it to 0 if you don't
        $dispip = "0";

        //DO NOT EDIT PAST THIS LINE!!!
        #############################################################

        $ip = getenv("REMOTE_ADDR");

        if ($dispip == "1"){
        $ipformat = "<small>($ip)</small>";
        }
        else {
        $ipformat = "";
        }

        ?>

        #####

        Does this make it easier? Also could the error be caused by the server somehow, its on f2s.com

        -Carl

          Are you missing a semi-colon in this line:
          $anonymsg = "No message provided..."

            Write a Reply...