File manager - Edit - /home/webapp68.cm.in.th/u68319090013/final/save_news.php
Back
<?php include('connect.php'); // ดึงการเชื่อมต่อเข้ามา if ($_SERVER["REQUEST_METHOD"] == "POST") { $headline = $con->real_escape_string($_POST['headline']); $content = $con->real_escape_string($_POST['content']); $sql = "INSERT INTO news (headline, content, time_news) VALUES ('$headline', '$content', NOW())"; if ($con->query($sql) === TRUE) { header("Location: ?page=news_student"); exit(); } else { echo "Error: " . $sql . "<br>" . $con->error; } } else { echo "Invalid Request"; } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.43 |
proxy
|
phpinfo
|
Settings