PHP Classes

File: addrecord2.php

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

Contents

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

<html>
<head>
    <title>Add new Record 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);

//$dbf->printarray( $GLOBALS);
$i = 0;

//print(sizeof($GLOBALS[_POST]));

while(list($key,$val) = each($GLOBALS[_POST])){
    if(
$key != "DB" && $key != "TABLE"){
       
$vstr .=",'$val'";
    }
}

$query = "INSERT INTO '$TABLE' values(''$vstr)";
$result = $dbf->query($query) or die(print("<b>Some fields were not entered correctly</b>, <a href=\"javascript: history.back();\">back</a>"));
print(
"New record has been added succesfully!");
?>
</center>
</body>
</html>

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