"; $errmsg = rtrim($errmsg, ", "); } // begin error message check if(!$errmsg){ $advertiser = trim($_POST[advertiser]); $contact = trim($_POST[contact]); $forumid = trim($_POST[forumid]); $address = mysql_escape_string(trim($_POST[address])); if (isset($_POST['address_two'])) { $address_two = mysql_escape_string(trim($_POST[address_two])); } else { $address_two = NULL; } $city = mysql_escape_string(trim($_POST[city])); $state = $_POST[state]; $state_tag = strtolower(str_replace(" ","", $state)); $zip = mysql_escape_string(trim($_POST[zip])); $phone = trim($_POST[phone]); $email = mysql_escape_string(trim($_POST[email])); $other = mysql_escape_string(trim($_POST[other])); $invoice = mysql_escape_string($_POST[invoice]); $notes = mysql_escape_string(nl2br(substr(trim($_POST[notes]), 0, 4096))); $submitted_by = $_POST[submitted_by]; // begin boolean check to see if we should insert the account into the dbase if($_POST[insert_account] == true){ $sql = "INSERT INTO io_account (account_advertiser, account_user_id_fk, account_contact, account_address, account_address_two, account_city, account_state, account_zip, account_phone, account_email, account_other, account_invoice, account_notes) VALUES ('$advertiser', '$forumid', '$contact', '$address', '$address_two', '$city', '$state', '$zip', '$phone', '$email', '$other', ',$invoice,', '$notes')"; //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 ?>