Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Frank Eblinger  >  form_db  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: form_db
Creates a form from DB-record and updates changes
Author: By
Last change:
Date: 11 years ago
Size: 764 bytes
 

Contents

Class file image Download
<?php
require("header_form.inc.php");
require(
"form_db.class.php");

$k_id=2;

$form= new form_db;
$form->action=$PHP_SELF;
$form->t_style="tablered";
$form->td_input_style="tf";
$form->tablewidth=300;
$form->button="button";
$form->submit="absenden";

$form->server="localhost";
$form->user="root";
$form->pw="";
$form->db="test";

$form->pwfield="passwd";

$form->query="select distinct name,vname,email,$form->pwfield from kunden where k_id=\"$k_id\"";
$form->descr="Name Vorname Email Password";


if(isset(
$name)){
  
$form->table="kunden";
  
$form->update($HTTP_POST_VARS,"k_id=\"$k_id\"");
   echo 
"<p class=tableblue>database successfully updated</p>";
    }
else
echo 
$form->create_form();
?>





</body>

</html>