<html>
<?
// called from: chgtypes.php
// description: inserts new types into TYPES table
//
include("connect.inc");
include("reqlogin.inc");
$x = 1;
while ($x <=10) {
if ($NewType[$x]) {
$InsTypeSQL = "INSERT INTO types (type_id, type_source, type_name) VALUES (NULL, '$TypeSource[$x]', '$NewType[$x]')";
$InsType = mysql_query($InsTypeSQL);
$errno = mysql_errno($db);
$error = mysql_error($db);
if (!($errno == 0)) {
print("<center>Error $errno: $error</center><br>");
exit;
}
}
$x++;
}
$Message = "<font color=red>Tables Updates Successfully</font>";
require("newtypes.php");
exit;