<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Add new field to table <?php print("$TABLE"); ?></title>
<link rel="stylesheet" href="settings.css" type="text/css">
</head>
<body>
<br><br><br>
<center>
<?php
include("common.inc");
$dbf->select_db($DB);
if($type == 'text') {
$type = "text(255)";
}
else {
if(!$Length){
print("Please enter a length for INT, <a href=\"javascript: history.back();\">back</a>");
die();
}else{
$type = "$type($Length)";
}
}
if(($type == 'text' AND $Length != '')) {
print("No need to give a length when defining as TEXT, <a href=\"javascript: history.back();\">back</a>");
}
else {
$query = "ALTER TABLE $TABLE ADD COLUMN $COLUMN $type $Flag";
$result = $dbf->query($query) or die("ERROR while adding new column, please check your flags.");
print("New field has been added succesfully!");
}
?>
</center>
</body>
</html>
|