Location: PHPKode > projects > NOLA > invleveladd.php
<? include('includes/main.php'); ?>
<? //invleveladd.php
     echo texttitle('Price Level Add');
     if ($description) { //if the user has submitted info
                  $recordSet=&$conn->Execute('select * from pricelevel where description='.sqlprep($description).' and (companyid=0 or companyid='.sqlprep($active_company).')');
                  if (!$recordSet->EOF) die (texterror("Price Level already exists with that description"));
                  checkpermissions('inv');
                  if ($conn->Execute("insert into pricelevel (description,companyid) VALUES (".sqlprep($description).",".sqlprep($active_company).")") === false) {
                     echo texterror("Error adding price level.");
                  } else {
                     echo textsuccess("Price Level added successfully.");
                  };
     };
     echo '<form action="invleveladd.php" method="post"><input type="hidden" name="nonprintable" value="1"><table><tr><td>Price Level Description:</td><td><input type="text" name="description" size="30"></td></tr>';
     echo '</table><input type="submit" value="Add"></form>';
?>
<? include('includes/footer.php'); ?>
Return current item: NOLA