12){ //Shorten it $name_tag = substr($nametag, 0, 12); } $address = mysql_real_escape_string(trim($_POST[address])); $address_two = mysql_real_escape_string(trim($_POST[address_two])); $city = mysql_real_escape_string(trim($_POST[city])); $state = mysql_real_escape_string($_POST[state]); $state_tag = mysql_real_escape_string(strtolower(str_replace(" ","", $state))); $zip = mysql_real_escape_string(trim($_POST[zip])); $phone = mysql_real_escape_string(trim($_POST[phone])); $fax = mysql_real_escape_string(trim($_POST[fax])); $email = mysql_real_escape_string(trim($_POST[email])); $website = mysql_real_escape_string(trim($_POST[website])); $cart = mysql_real_escape_string(trim($_POST[cart])); $spoke = mysql_real_escape_string(trim($_POST[spoke])); $mailorder_ecommerce = mysql_real_escape_string(trim($_POST[mailorder_ecommerce])); $mailorder_phone = mysql_real_escape_string(trim($_POST[mailorder_phone])); $local_ecommerce = mysql_real_escape_string(trim($_POST[local_ecommerce])); $local_phone = mysql_real_escape_string(trim($_POST[local_phone])); $pickup_ecommerce = mysql_real_escape_string(trim($_POST[pickup_ecommerce])); $pickup_phone = mysql_real_escape_string(trim($_POST[pickup_phone])); $contact = mysql_real_escape_string($_POST[contact]); if ( $contact == 0 ){ $contact_names = NULL; }else{ $contact_names = mysql_real_escape_string(trim($_POST[contact_names])); } $fist = mysql_real_escape_string($_POST[fist]); if ( $fist == 0 ){ $fist_names = NULL; }else{ $fist_names = mysql_real_escape_string(trim($_POST[fist_names])); } $fist_road = mysql_real_escape_string($_POST[fist_road]); if ( $fist_road == 0 ){ $fist_road_names = NULL; }else{ $fist_road_names = mysql_real_escape_string(trim($_POST[fist_road_names])); } $fist_advanced = mysql_real_escape_string($_POST[fist_advanced]); if ( $fist_advanced == 0 ){ $fist_advanced_names = NULL; }else{ $fist_advanced_names = mysql_real_escape_string(trim($_POST[fist_advanced_names])); } $bfact = mysql_real_escape_string(trim($_POST[bfact])); $serotta = mysql_real_escape_string($_POST[serotta]); if ( $serotta == 0 ){ $serotta_names = NULL; }else{ $serotta_names = mysql_real_escape_string(trim($_POST[serotta_names])); } /* Need to ltrim and rtrim commas before insertion --> or ltrim/rtrim before implosion*/ $methods = mysql_real_escape_string($_POST[methods]); $fitbikes = mysql_real_escape_string($_POST[fitbikes]); $motioncapture = mysql_real_escape_string($_POST[motioncapture]); $wetsuits = mysql_real_escape_string($_POST[wetsuits]); $bikes = mysql_real_escape_string($_POST[bikes]); $customs = mysql_real_escape_string($_POST[customs]); $hours = mysql_real_escape_string(trim($_POST[hours])); $barnett = mysql_real_escape_string($_POST[barnett]); if ( $barnett == 0 ){ $barnett_names = NULL; }else{ $barnett_names = mysql_real_escape_string(trim($_POST[barnett_names])); } $ubi = mysql_real_escape_string($_POST[ubi]); if ( $ubi == 0 ){ $ubi_names = NULL; }else{ $ubi_names = mysql_real_escape_string(trim($_POST[ubi_names])); } $info = mysql_real_escape_string(nl2br(substr(trim($_POST[info]), 0, 4096))); $directions = mysql_real_escape_string(nl2br(substr(trim($_POST[directions]), 0, 4096))); $submitted_by = mysql_real_escape_string($_POST[submitted_by]); if($_POST[confirm1] == 1){ $sql = "INSERT INTO gforum_Retailers (retailer_name, retailer_name_tag, retailer_address, retailer_address_two, retailer_city, retailer_state, retailer_state_tag, retailer_zip, retailer_phone, retailer_fax, retailer_email, retailer_website, retailer_cart, retailer_mailorder_ecommerce, retailer_mailorder_phone, retailer_local_ecommerce, retailer_local_phone, retailer_pickup_ecommerce, retailer_pickup_phone, retailer_contact, retailer_contact_names, retailer_fist, retailer_fist_names, retailer_fist_road, retailer_fist_road_names, retailer_fist_advanced, retailer_fist_advanced_names, retailer_bfact, retailer_serotta, retailer_serotta_names, retailer_method, retailer_fitbikes, retailer_motioncapture, retailer_wetsuits, retailer_bikes, retailer_customs, retailer_hours, retailer_barnett, retailer_barnett_names, retailer_ubi, retailer_ubi_names, retailer_info, retailer_directions, retailer_submitted_by, retailer_valid, retailer_spoke) VALUES ('$name', '$name_tag', '$address', '$address_two', '$city', '$state', '$state_tag', '$zip', '$phone', '$fax', '$email', '$website', '$cart', '$mailorder_ecommerce', '$mailorder_phone', '$local_ecommerce', '$local_phone', '$pickup_ecommerce', '$pickup_phone', $contact, '$contact_names', $fist, '$fist_names', $fist_road, '$fist_road_names', $fist_advanced, '$fist_advanced_names', '$bfact', $serotta, '$serotta_names', '$methods', ',$fitbikes,', ',$motioncapture,', ',$wetsuits,', ',$bikes,', ',$customs,', '$hours', $barnett, '$barnett_names', $ubi, '$ubi_names', '$info', '$directions', $submitted_by, 0, '$spoke')"; //echo("shop entered!"); //echo($sql); //exit(); mysql_query($sql) OR die(mysql_error()); //exit(); }else{ //echo("shop NOT entered."); $confirm = 1; } } //}else{ // $errmsg = 'Incorrect key.'; //} ?>