PHP Classes

File: editfield2.php

Recommend this page to a friend!
  Classes of Marius  >  dbFile  >  editfield2.php  >  Download  
File: editfield2.php
Role: Application script
Content type: text/plain
Description: editfield2.php
Class: dbFile
file based web database and Administrator
Author: By
Last change:
Date: 18 years ago
Size: 943 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
    <title>Edit field <?php print("$Field"); ?></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 {
   
$type = "$type($Length)";
}

if(
$Originalfield != $Field) {
$query2 = "ALTER TABLE $TABLE CHANGE $Originalfield $Field $type $Flag";
$result2 = $dbf->query($query2) or die("Error while renaming field, please check your flags.");
print(
"Properties changed, new name set for field.<br>");
}
else {
$query2 = "ALTER TABLE $TABLE CHANGE $Originalfield $Originalfield $type $Flag";
$result2 = $dbf->query($query2) or die("Error while saving properties, please check your flags.");
print(
"Properties changed, no new name set for field.<br>");
}
?>
</center>

</body>
</html>


For more information send a message to info at phpclasses dot org.