P
P
Pavl-852021-08-04 18:47:19
PHP
Pavl-85, 2021-08-04 18:47:19

How to remove the word "delete" in the guestbook when refreshing the page?

There is this code:

/* Удаление записи из БД */
if(isset($_GET['id']) && isset($_GET['del'])){
    echo  'Удаление';

    $query_del ="DELETE FROM msgs WHERE id = ".(int)$_GET['del'];

    mysqli_query($link, $query_del);
}


Further in the while loop there is a link:
echo '<a href="' . 'http://mysite.local/index.php?id=gbook&del=' .$row['id'] . '">Удалить</a>';

When deleting a certain entry from the guest book, the word "Deletion" appears, and in the address bar a line like this: mysite.local/index.php?id=gbook&del=25
It is necessary that the word "Deletion" disappear when the page is refreshed.
How to do it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question