', '
')); + break; + + default: + echo 0; + return 0; + break; + } + + $insert_news = $mySQLconnect -> prepare('insert into noticias (title, content, icon_route, page, author, frist_paragraph) values (?, ?, ?, ?, ?, ?)'); + + $insert_news -> bindParam(1, $title, PDO::PARAM_STR); + $insert_news -> bindParam(2, $inner_HTML, PDO::PARAM_STR); + $insert_news -> bindParam(3, $icon, PDO::PARAM_STR); + $insert_news -> bindParam(4, $page, PDO::PARAM_STR); + $insert_news -> bindParam(5, $author, PDO::PARAM_STR); + $insert_news -> bindParam(6, $frist_p, PDO::PARAM_STR); - default: - # code... - break; + $insert_news -> execute(); + + $ids_done = file_get_contents('./news/00_ids_done.txt'); + $num = $ids_done + 1; + file_put_contents('./news/00_ids_done.txt', $num); + rename($news_unique,"./news/$num.html"); + file_put_contents('./news/00_news_done.txt', "./news/$num.html", FILE_APPEND); + } -*/ + ?> \ No newline at end of file