Code: Select all
<input name="articles_date" type="hidden" id="articles_date" value="<?php echo datetime(); ?>">Moderator: General Moderators
Code: Select all
<input name="articles_date" type="hidden" id="articles_date" value="<?php echo datetime(); ?>">Code: Select all
<?php echo date(); ?>Code: Select all
echo date("H:i d M Y");Code: Select all
<?php
$updateSQL = sprintf("UPDATE con_articles SET title=%s, author=%s, img_th=IFNULL(%s,img_th), img=IFNULL(%s,img), teaser=%s, common=%s, topic_id=%s, content=%s, articles_date = now(), active=%s, search1=%s, search2=%s, search3=%s WHERE id=%s",
GetSQLValueString($_POST['title'], "text"),
GetSQLValueString($_POST['author'], "text"),
GetSQLValueString($_POST['img_th'], "text"),
GetSQLValueString($_POST['img'], "text"),
GetSQLValueString($_POST['teaser'], "text"),
GetSQLValueString($_POST['common'], "text"),
GetSQLValueString($_POST['topic_id'], "text"),
GetSQLValueString($_POST['content'], "text"),
GetSQLValueString($_POST['articles_date'], "date"),
GetSQLValueString(isset($_POST['active']) ? "true" : "", "defined","'Y'","'N'"),
GetSQLValueString($_POST['search1'], "text"),
GetSQLValueString($_POST['search2'], "text"),
GetSQLValueString($_POST['search3'], "text"),
GetSQLValueString($_POST['id'], "int"));
mysql_select_db($database_econtrol_truth411com, $econtrol_truth411com);
?>Code: Select all
foo='bar'Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Please try the following:
Change line 2 to:Code: Select all
$updateSQL = sprintf("UPDATE con_articles SET title=%s, author=%s, img_th=IFNULL(%s,img_th), img=IFNULL(%s,img), teaser=%s, common=%s, topic_id=%s, content=%s, articles_date=%s, active=%s, search1=%s, search2=%s, search3=%s WHERE id=%s",
Change line 11 to:
GetSQLValueString(isset($_POST['articles_date']) ? "true" : "", "defined","NOW()","0"),Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]