I am building a dynamic website and I am trying to do a prepared request but when ever I type execute command the browser cant load the HTML code below the PHP code.
Here is my code .
Before I have some html / php code
<div class="lien">
<p>Date</p>
<input type="date" name="date">
</div>
<div class="titre">
<p>Information</p>
<input type="text" name="info">
</div>
<div class="submit">
<input type="submit" value="submit">
</div>
<input type="hidden" value="<?php echo $donnees['id'];?>" name="userid">
<?php
$date = isset( $_POST['date'] ) ? $_POST['date'] : "";
$matiere = isset( $_POST['matiere'] ) ? $_POST['matiere'] : "";
$classe = isset( $_POST['classe'] ) ? $_POST['classe'] : "";
$info = isset( $_POST['info'] ) ? $_POST['info'] : "";
$userid = $_SESSION['id'];
$requete = $bdd -> prepare('INSERT INTO calendrier (date , matiere , classe , titre , userid) VALUES (?,?,?,?,?)');
$requete -> execute(array($date , $matiere , $classe , $info , $userid ));
?>
</div>
</form>
</div>
</section>
<section class="afficheCalendar" id="afficheCalendar">
<div id="taskContenaire">
<!--TASK-->
<?php
$req = $b
and here too
Whenever I remove $requete -> execute(array($date , $matiere , $classe , $info , $userid )); the website works normally.
Here is before (when the execute is in my code)
And here is after I delete the line