I have a problem with my header location. On the first time, the header location works fine,
but, the second time, it doesn't work. I've removed all the spaces and empty rules in the code but I have still the same problem.
First header:
<div class="col-lg-4">
<?php if ($berichtauteur == $_SESSION['sess_user']) {
?>
<form action="" method="post">
<button class="btn btn-success" type="submit" name="beantwoord">Markeren als beantwoord </button>
</form>
<?php
if (isset($_POST['beantwoord'])) {
$updatestatus = "UPDATE forum_subonderwerp SET subonderwerp_status = '1' where subonderwerp_ID=". $subject. ";";
@mysqli_query ($verbinding, $updatestatus) or die (mysqli_error($verbinding));
header('Location: http://google.nl');
}
}
?>
</div>
Second header:
<div class="modal-body">
<form action="" method="post">
<textarea name="text" id="text"></textarea>
<script>CKEDITOR.replace('text');</script>
<button class="btn btn-warning" type="submit" name="plaatsreactie">Plaats reactie </button>
</form>
</div>
<?php
if (isset($_POST["plaatsreactie"])) {
header('Location: http://qooqle.nl');
$queryinput ="INSERT INTO forum_reacties (reactie_bericht, subonderwerp_ID, reactie_plaatser) VALUES ('".$_POST['text']."', '".$subject."', '".$useridnummer."')";
@mysqli_query ($verbinding, $queryinput) or die (mysqli_error($verbinding));
}
?>
</div>