Hello to all. Tell me, I made a file with the addition of news from the video lesson, but the trouble is ... they did not tell me how to remove it (without phpmyadmin). Here is the code that turned out.
<hr> <html> <center><h1>Новости</h1></center> <hr> <?php if ($_POST['post']) { $title = $_POST['title']; $body = $_POST['body']; if($title&&$body) { mysql_connect("localhost", "admin", "159357") or die(mysql_error()); mysql_select_db("admin") or die(mysql_error()); $date = date("Ymd"); $insert = mysql_query("INSERT INTO news VALUES('','$title','$body','$date')") or die(mysql_error()); die("Новость добавлена"); } else echo "Заполните все поля<p>"; } ?> <center><form action = 'post.php' method = 'POST'> Название : <br> <input type ='text' name='title'><p> Текст : <br> <textarea rows='6' cols='35' name='body'></textarea><p> <input type='submit' name='post' value='Добавить новость'> </form></center> </hr> </html>