Jump to content

magcr23

Members
  • Posts

    80
  • Joined

  • Last visited

Everything posted by magcr23

  1. solved
  2. Hi guys, as everybody know, in any message system we can delete the message, but i don't want do delete, i want to hide it from the users. An example of what i want: miguel sent a message to admin after admin read it appears for both users the link"delete", but it will only hide the message from the user who pressed the link, the other one will be able to see the message whenever he want. I have this data base: id, from, to, subject, message, date, raiz, read, visible and this code: to show the button: while($ln = mysqli_fetch_assoc($result)){ if($ln['raiz'] == 0 && $ln['visible'] == 1){ echo '<a href="mostraMSG.php?message='.$ln['id'].'"><h2>'.$ln['subject'].'</a><small> para: '. $ln['to'] .'</small></h2>'; if($ln['read'] == 1){ echo '<a href="esconder.php?delete='.$ln['id'].'">apagar</a>'; } } } to hide the message: $update = "UPDATE `messages` SET `visible` = 0 WHERE `id` = '$esconder'"; mysqli_query($con, $update); The problem is if i do this update, it will hide for both of them, How can i make it hide for the one who pressed the link?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.