PHP Classes

File: addrecord.php

Recommend this page to a friend!
  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: 18 years ago
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>

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