How to make the appearance of the form using php jquery?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
15 views
Any news on the website they look like:
5ae82e0f645fc478709131.jpeg
When you click on the edit button(pencil) the page refreshes and and become like this:
5ae82e469321d331891917.jpeg
How to make this action without refresh the page?
Code:
<?phpif (isset($_POST['subred'])) {if ($_POST['aretext'] == '') {$errors = "Введите текст!";}if (!isset($errors)) {$text = $_POST['aretext'];$id = $new['id'];$rest = mysqli_query($connection, "UPDATE `news` SET `desc` = '$text' WHERE `news`.`id` = $id");}}?><?php echo $new['name']; ?>Date of publication: <?php echo $new['date']; ?><?php if (!isset($_POST['rednews'])) {?><?php echo $new['desc']; ?><?php } elseif (isset($_POST['rednews']))) {?><?php}if (isset($_SESSION['Auth']) and $user['dost'] == 'admin') {?><?php}?>
by | 15 views

1 Answer

0 like 0 dislike
Create a modal window, it loads data via an ajax request, edit data, click save, also using ajax, write the changes, close the modal window.
To change the page displayed immediately after editing, you need to redo the display so via ajax, or just after saving, reload the page
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users