Location: PHPKode > projects > RadMacLab > radmaclab/admin/add_printers_process.php
<?php

include ('includes/func_vars_inc.php');
include ('includes/auth_check.php');

if ($_POST['printer_name'] == ""){
	@ header("Location: ".$uri_scheme.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/add_build.php?msg=You+must+enter+a+printer+name.");
	exit;
}

if ($_POST['assignment'] == ""){
	@ header("Location: ".$uri_scheme.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/add_build.php?msg=You+must+enter+a+lpadmin+command.");
	exit;
}




$sql  = "INSERT  INTO  `printers` (  `printerID` ,  `printer_name` ,  `assignment` ) 
	VALUES (  '', '".addslashes($_POST['printer_name'])."',  '".addslashes($_POST['assignment'])."');"; 
	
dbase_query($sql);

  @ header("Location: ".$uri_scheme.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/add_printers.php?msg=Printer+added+successfully.");

?>
Return current item: RadMacLab