"; $errmsg = rtrim($errmsg, ", "); } // begin error message check if(!$errmsg){ $account_id = $_POST[account_id]; $account_advertiser = trim($_POST[account_advertiser]); $account_contact = trim($_POST[account_contact]); $account_user_id_fk = trim($_POST[account_user_id_fk]); $account_address = mysql_escape_string(trim($_POST[account_address])); if (isset($_POST['account_address_two'])) { $account_address_two = mysql_escape_string(trim($_POST[account_address_two])); } else { $account_address_two = NULL; } $account_city = mysql_escape_string(trim($_POST[account_city])); $account_state = $_POST[account_state]; $account_state_tag = strtolower(str_replace(" ","", $account_state)); $account_zip = mysql_escape_string(trim($_POST[account_zip])); $account_phone = trim($_POST[account_phone]); $account_email = mysql_escape_string(trim($_POST[account_email])); $account_other = mysql_escape_string(trim($_POST[account_other])); $account_invoice = mysql_escape_string($_POST[account_invoice]); $account_notes = mysql_escape_string(nl2br(substr(trim($_POST[account_notes]), 0, 4096))); // begin boolean check to see if we should insert the account into the dbase if($_POST[insert_account] == true){ $sql = "UPDATE io_account SET account_advertiser = '$account_advertiser', account_user_id_fk = '$account_user_id_fk', account_contact = '$account_contact', account_address = '$account_address', account_address_two = '$account_address_two', account_city = '$account_city', account_state = '$account_state', account_zip = '$account_zip', account_phone = '$account_phone', account_email = '$account_email', account_other = '$account_other', account_invoice = '$account_invoice', account_notes = '$account_notes' WHERE account_id = $account_id"; //echo("account entered!"); //echo($sql); mysql_query($sql) OR die(mysql_error()); //exit(); $insert_success = true; }else{ //echo("shop NOT entered."); $confirm_account = true; } // end insert check } // end error message check ?>