Login   Register  
PHP Classes
elePHPant
Icontem

File: addrecord.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Marius  >  dbFile  >  addrecord.php  >  Download  
File: addrecord.php
Role: Application script
Content type: text/plain
Description: addrecord.php
Class: dbFile
file based web database and Administrator
Author: By
Last change:
Date: 2004-04-19 04:28
Size: 1,280 bytes
 

Contents

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

<html>
<head>
    <title>Add Record in table <?php print("$TABLE"); ?></title>
            <link rel="stylesheet" href="settings.css" type="text/css">
</head>

<body>
<center>
Add Record in table <font color=#FF0000><?php print("$TABLE"); ?></font><br><br>
<?php
include("common.inc");
$dbf->select_db($DB);
$res $dbf->list_fields($DB,$TABLE);
$fields sizeof($res);

?>
<form name=form1 action=addrecord2.php? method=post>
<input type=hidden name=DB value="<?php print("$DB"); ?>">
<input type=hidden name=TABLE value="<?php print("$TABLE"); ?>">
<?php

print("<table border=0>");
$i 0;
while(
$i $fields){
  
$type  $res[$i]['type'];
  
$name  $res[$i]['field'];
  
$len   $res[$i]['size'];
  
$flags $res[$i]['flags'];

    if(
$res[$i]['flags'] != "auto_increment"){
        
        print(
"<tr><td>".strtoupper($res[$i]['field'])."</td><td><input type=\"text\" name=\"".$res[$i]['field']."\"></td>");
        print(
"<td valign=top><br>$type($len$flags</td></tr>");
    }
    
$i $i 1;
}

print(
"</tr>");

print(
"<tr><td colspan=\"3\" align=\"center\">");
?>
<input type="Submit" name="" value="Submit">

<?
print("</td></tr>");

print(
"</table>");
?>


</center>

</body>
</html>