topical media & game development
professional-sql-10-public-files-post-admin.php / php
<?php
// include shared code
include '../lib/common.php';
include '../lib/db.php';
include '../lib/functions.php';
// this should not be available unless the user has logged in
include '401.php';
// insert a new blog entry
if (query = sprintf('INSERT INTO \%sBLOG_POST SET POST_TITLE = "\%s", ' .
'POST_DATE = "\%s", POST_TEXT = "\%s"',
DB_TBL_PREFIX,
mysql_real_escape_string(GLOBALS['DB']),
mysql_format_date(_POST['post_text'], query, _POST['delete']))
{
_POST['post_id']);
mysql_query(GLOBALS['DB']);
}
// update entry
else
{
_POST['post_title'], _POST['post_date']),
mysql_real_escape_string(GLOBALS['DB']),
query, GLOBALS['DB']);
header('Location: admin.php');
?>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.