<?php
@define('HOST','localhost');
@define('USER','root'); // Database Access User Name
@define('PASSWORD',''); // Database Access Password
@define('DATABASE','poll'); // Database Name
@define('PREFIX',''); // Table prefix
include_once('dbclass.php');
include_once('dbfiler.php');
$DB =new DBFilter(); // Create an object of Dbfilter.
//suppose you want to add record in 'employee table'.
// see how it is simple
// here 'emp_name' is field in your 'employee' table.
if($_POST['add_emp'])
{
global $DB;
$DB->InsertRecord('employee',$_POST);
}
?>
<form name="frmlist" enctype="multipart/form-data">
Enter Employee Name: <input type="text" name="emp_name" id="emp_name">
<input type="submit" name="add_emp" id="add_emp">
</form>
|