Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require "admin.php";
- ?>
- <table border="1px" width="100%">
- <tr>
- <th>Атрибут</th>
- <th>Фото 1</th>
- <th>Фото 2</th>
- <th>Наимен.</th>
- <th>Описание</th>
- <th>Полное опис.</th>
- <th>Цена 1</th>
- <th>Цена 2</th>
- <th>Цена 3</th>
- <th>Производ.</th>
- <th>Удалить</th>
- <th>Редак-ть</th>
- </tr>
- <?php
- include ('../db.php');
- $ss = "SELECT * FROM `products` ORDER BY `id` DESC";
- $sql = mysqli_query($connection, $ss);
- $result = mysqli_fetch_assoc($sql);
- do
- {
- echo '<tr>
- <td>'.$result['atribute'].'</td>
- <td>'.$result['image1'].'</td>
- <td>'.$result['image2'].'</td>
- <td>'.$result['name'].'</td>
- <td>'.$result['opis'].'</td>
- <td>'.$result['longopis'].'</td>
- <td>'.$result['price'].'</td>
- <td>'.$result['price1'].'</td>
- <td>'.$result['price2'].'</td>
- <td>'.$result['madein'].'</td>
- <td><a href="?del_id='.$result['id'].'">Удалить</a></td>
- <td><a href="red.php?red_id='.$result['id'].'">Ред-ть</a></td>
- </tr>';
- }
- while ($result = mysqli_fetch_array($sql));
- ?>
- </table>
- <?php
- include ('../db.php');
- // удаление записи
- $dd = 'DELETE FROM `products` WHERE `id` = '.$_GET['del_id'];
- if(isset($_GET['del_id'])){
- $sql = mysqli_query($connection, $dd);
- }
- ?>
Add Comment
Please, Sign In to add comment