Skip to content

Instantly share code, notes, and snippets.


Created Mar 5, 2017
What would you like to do?
<?php include 'db.php'; ?>
if (isset($_POST['submit'])) {
$name = $_POST['name'];
$body = $_POST['body'];
$date = date('Y-m-d');
$query = mysql_query("INSERT INTO post (name,body,postedon) VALUES('$name','$body','$date')");
if ($query) {
echo "<script>alert('Posted Successfully!')</script>";
echo "<script>'index.php','_self')</script>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.