vendredi 28 octobre 2016

How to hide an html element with php if a button is pressed?

I would like to hide a simple div, if someone click a button. The 'details' var holds an id from db.

<div class="greetings" <?php if(isset($_GET['details'])) {echo " style='display: none'"; } ?>
  <p> some text </p>
<div>

But id doesn't work. I appreciate any suggestions :)

Aucun commentaire:

Enregistrer un commentaire