1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Rep Power

    Don't see the header mistake..

    I don't see the headers already sent mistake here.. It says on lines 3 and 11... does anyone see it?

    <?php require('../includes/connect.php');
    $postTitel = $_POST['postTitel'];
    $postInhoud = mysql_real_escape_string($_POST['postInhoud']);
    $paginaID = $_POST['paginaID'];
    if($postTitel != "" && $postInhoud != "" && $paginaID != ""){
    mysql_query("INSERT INTO posts VALUES ('','$postTitel','$postInhoud','$paginaID')");
    header('location: index.php?status=success');
    } else {
    echo "1 of meerdere velden niet ingevuld";
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Rep Power
    You could try putting

    PHP Code:
    at the start, and

    PHP Code:
    at the end of your script. Also make sure you start your session in the right place, and not do it twice.
  4. #3
  5. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Rep Power

    after 61 postings, you really should know how to use the [ PHP ] code tags.

    I'm pretty sure there's something (whitespace?) above your code, because the line numbers obviously don't fit the actual lines.

    Put the exact script content in code tags and give us the concrete error message.
  6. #4
  7. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Pennsylvania, USA
    Rep Power
    Please read the new user guide, I know you've been asked to before. Unformatted code is very annoying to read.

    There is no output in this script aside from...the actual output you have there near the bottom.

    You say the header error is given for lines 3 and 11, yet the header call itself is on line 8 of what you showed. Do you have lines before this code? Is the error in THIS code or in your include file?
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo