I am a total newb
First I have this code:
$post_renew = trim(htmlspecialchars($_POST['renew']));
if ($post_renew && $_POST['ad'])
{
$renew_days = ($admin_renew_days*86400);
$expiry = time()+$renew_days;
$expiry_dt = date("Y-m-d H:i:s", $expiry);
if ($admin_renew_cre_dt == 1)
{
$create_date = date("Y-m-d H:i:s", time());
$update_create_dt = ", createdon = '$create_date'";
}
$adlist = implode(" OR adid = ", $_POST['ad']);
if ($adlist)
{
$adlist = "adid = " . $adlist;
$sql = "UPDATE $table SET expireson = '$expiry_dt' $update_create_dt WHERE $adlist";
//echo $sql; // testing
if(mysql_query($sql)) $msg = mysql_affected_rows() . " ad(s) have been renewed";
else $err = "Error renewing ads";
}
}
But i have a variable called $fullcode
If a user enters a $fullcode that is already in the database, I want the "createdon" variable to be updated with the submit button