<<<<Restricted Area>>>>" . "
Sorry, you must Log In to view this Page

"); exit(); } $usrn = $_GET['usrn']; if($usrn == ""){ $usrn = $_POST['usrn']; } if($usrn == ""){ echo("

<<<<Restricted Area>>>>" . "
Problem with your username. Please Log In again.

"); exit(); } $newly = $_POST['newly']; $co_named = stripslashes($_POST['co_name']); if($co_named == ""){ $air[] = "No Company Name"; } $co_rep = stripslashes($_POST['co_rep']); if($co_rep == ""){ $air[] = "No Company Representative Name"; } $email = $_POST['email']; if($email == ""){ $air[] = "No Company Email"; } $order_email = $_POST['order_email']; $reg = $_POST['reg']; $address = stripslashes($_POST['address']); $city = stripslashes($_POST['city']); $state = $_POST['state']; $ZipCode = $_POST['ZipCode']; $country = $_POST['country']; $phone = $_POST['phone']; if($phone == ""){ $air[] = "No Company Phone"; } $FAX = $_POST['FAX']; $website = $_POST['website']; $co_name = htmlspecialchars($co_named, ENT_QUOTES, 'utf-8'); $co_rep = htmlspecialchars($co_rep, ENT_QUOTES, 'utf-8'); $address = htmlspecialchars($address, ENT_QUOTES, 'utf-8'); $city = htmlspecialchars($city, ENT_QUOTES, 'utf-8'); $moveon = "mfg_edit.php?usrn=".$usrn."&fr=".$dnum."&co=".$co_named; if(!empty($air)){ echo("

New Manufacturer could not be inserted:
"); foreach($air as $value){ echo("
$value"); } echo("

Please go back and enter required information.

"); }else{ $dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1'); mysql_select_db('ecosmar_products', $dbcnx); $ok = mysql_query("INSERT INTO mfg SET co_name='$co_named',co_rep='$co_rep',email='$email',order_email='$order_email',reg='$reg',address='$address',city='$city',state='$state',ZipCode='$ZipCode',country='$country',phone='$phone',FAX='$FAX',website='$website'"); if(!$ok){ echo("

New Manufacturer could not be inserted. Error:
".mysql_error()."

"); }else{ header("Location: $moveon"); } } ?>