From the beginning. I'm working on a small web application, using PHP. It consists in some kind of notepad, you can write a note and it'll save it for you. My problem is in deleting those notes, I can't figure out a way to delete the correct note. I query the database and show everything with a simple loop:
while($rows=mysqli_fetch_assoc($query_for_content)){
echo '
<div class="col-md-4">
<h2>' . $rows['title_text']. '</h2>
<p style="overflow-y:scroll; max-height:150px">' . $rows['txt_mensagem']. '</p>
<p style="color:#A0A0A0; font-size:90%;">' . $rows['date_creation']. '</p>
<p><a class="btn btn-secondary" id="row_table" data-toggle="modal" data-target="#open_modal_edit" role="button">Detail »</a></p>
</div>';
}
As you can see I gave it some simple style, and put it inside a div.
I've been thinking about my problem for some time, googled, asked friends, no luck.
The problem is that I can't figure out the correct query to delete the message. As shown in the picture I have some fields as "Title", "Message" and "Date of creation". I thought about using those field to create the query, but I can't access the fields.
I hope I didn't confuse you, and in case I did, please ask me so I can help you help me :D