Location: PHPKode > projects > EzyBiz > ezybiz/adminarcarrieradd.php
<?php
include('includes/main.php');
include('includes/arfunctions.php');
?>
<script language="JavaScript" src="js/validatephone.js">
</script>
<?php
//$conn->debug = true;
templatetop("SHIPPING CARRIER ADD");
if ($name)
{
	$conn->BeginTrans();
	$conn->Execute("INSERT INTO company (companyname)VALUES('".$name."')");
	$companyid = $conn->Insert_ID();
	$query = "INSERT INTO carrier
		(
			companyid,
			customernumber,
			trackingurlbase,
			trackingurlvarname,
			address,
			suburb,
			state,
			postcode,
			country,
			phone1,
			phone1comment,
			email,
			emailcomment,
			url,
			federalid
		)
		VALUES
		(
			".sqlprep($companyid).",
			".sqlprep($customernumber).",
			".sqlprep($trackingurlbase).",
			".sqlprep($trackingurlvarname).",
			".sqlprep($address1).",
			".sqlprep($city).",
			".sqlprep($state).",
			".sqlprep($zip).",
			".sqlprep($country).",
			".sqlprep($phone1).",
			".sqlprep($phone1comment).",
			".sqlprep($email1).",
			".sqlprep($email1comment).",
			".sqlprep($website).",
			".sqlprep($federalid)."
		)
	";
	if ($conn->Execute($query))
	{
		echo textsuccess("Succefully Added Carrier");
		exit;
	}
	else
	{
		$conn->RollbackTrans();
		die(texterrorend("Error Adding Carrier"));
	}
}
echo '<form action="adminarcarrieradd.php" method="post"><input type="hidden" name="nonprintable" value="1"><table>';
formarcarrieradd();
echo '</table><input type="submit" value="Add"></form>';
templatebottom();
include('includes/footer.php'); ?>
Return current item: EzyBiz