Author:
';
} else {
$sql = "INSERT INTO `news` ( `author`, `body`, `dateposted`, `email`) VALUES ( '". addslashes ( $_SESSION['username'] ) . "', '". addslashes ( $_POST['post'] ) . "', '". date("F j, Y"). "', '". $_SESSION['email']. "' )";
$result = mysql_query ( $sql ) or die ( mysql_error() );
if ( $result )
{
echo 'The news post has ben entered succsefullly. Click here to return to the home page!
';
}
else
{
echo 'SQL ERROR: Unable to write to mySQL table.';
}
}
}
?>