Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. <?php
  2.   include("../inc/db/connect.php");
  3.  
  4.     $title                  = $_POST['post_title'];
  5.     $content                = $_POST['post_content'];
  6.     $category               = $_POST['post_category'];
  7.  
  8.  
  9.     $db->query("INSERT INTO my_posts (post_title, post_content, fk_post_category) VALUES ('{$title}', '{$content}', '{$category}')");
  10.  
  11.     header("Location: add-post.php?msg=1");
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement