"; } // begin error message check if(!$errmsg){ $account_id = $_POST['account_id']; $name = trim($_POST['name']); $date_repeat = NULL; if (isset($_POST['day_repeat']) && isset($_POST['month_repeat'])) { $year_repeat = $_POST['year_repeat']; $month_repeat = $_POST['month_repeat']; $day_repeat = $_POST['day_repeat']; $date_repeat = "$year_repeat-$month_repeat-$day_repeat"; } $ad_300x250 = $_POST['300x250']; $ad_300x250_impression = trim($_POST['300x250_impression']); $ad_728x90 = $_POST['728x90']; $ad_728x90_impression = trim($_POST['728x90_impression']); $ad_300x600 = $_POST['300x600']; $ad_300x600_impression = trim($_POST['300x600_impression']); $ad_970x250 = $_POST['970x250']; $ad_970x250_impression = trim($_POST['900x250_impression']); $ad_wallpaper = $_POST['wallpaper']; $ad_wallpaper_impression = trim($_POST['wallpaper_impression']); $year = $_POST['year']; $month = $_POST['month']; $day = $_POST['day']; $date = "$year-$month-$day"; $notes = mysql_escape_string(nl2br(substr(trim($_POST['notes']), 0, 4096))); // begin boolean check to see if we should insert the coach into the dbase if($_POST[insert_campaign] == true){ $sql = "INSERT INTO io_campaign (`campaign_account_id_fk`, `campaign_name`, `campaign_300x250`, `campaign_300x250_impression`, `campaign_728x90`, `campaign_728x90_impression`, `campaign_300x600`, `campaign_300x600_impression`, `campaign_970x250`, `campaign_970x250_impression`, `campaign_wallpaper`, `campaign_wallpaper_impression`, `campaign_date`, `campaign_date_repeat`, `campaign_notes`) VALUES ('$account_id', '$name', '$ad_300x250', '$ad_300x250_impression', '$ad_728x90', '$ad_728x90_impression', '$ad_300x600', '$ad_300x600_impression', '$ad_970x250', '$ad_970x250_impression', '$ad_wallpaper', '$ad_wallpaper_impression', '$date', '$date_repeat', '$notes')"; //echo("campaign entered!
"); //echo($sql); mysql_query($sql) OR die(mysql_error()); //exit(); $insert_success = true; }else{ //echo("campaign NOT entered."); $confirm_campaign = true; } // end insert check } // end error message check ?>