So when i add a post the timestamp doesnt work, but when i edit a post it updates it to the correct time/date.

Here is my addPost code:


<?php include('includes.php'); ?>

Code HTML4Strict:
<!DOCTYPE html>
		<title>QSS - admin area</title>
		<link href=',700' rel='stylesheet' type='text/css'>
		<link rel="stylesheet" href="admin.css" type="text/css" media="all">
		<div class="wrapper">
			<span>Logged in! Welcome <?php echo $_SESSION['user']; ?></span>
			<a href="logout.php">Logout</a>
			<ul class="topnav">
				<li><a href="index.php">Home</a></li><li><a href="posts.php">Manage Posts</a></li><li><a href="cats.php">Manage Categories</a></li><li><a href="pages.php">Manage Pages</a></li>
			<div class="content">
				<form action="doAddPost.php" method="post">
					<label for="Postname">Name</label><br>
					<input type="text" name="PostName" /><br>
					<label for="PostAuthor">Author</label><br>
					<input type="text" name="PostAuthor" /><br>
					<label for="PostContent">Content</label><br>
					<textarea name="PostContent"></textarea><br>
					<input type="submit" value="Add" name="submit" />

My doAddPost.php file:

Code PHP:
if(isset($_POST['submit'])) {
	if(isset($_POST['PostName'])) {
		if(isset($_POST['PostContent'])) {
			header("Location: posts.php");
		} else {
			echo "Please enter some content!";
	} else {
		echo "Please set a post name" ;
} else {
	header("Location: addPost.php");

My addPost function:

Code PHP:
function addPost($pName, $pAuthor, $pContent, $pDate) {
	$query = mysql_query("INSERT INTO posts VALUES('','$pName', '$pAuthor', '$pContent', '$pDate')") or die(mysql_error());