Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
ToDo01
:
ajax_action.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php include_once 'config/Database.php'; include_once 'class/Records.php'; $database = new Database(); $db = $database->getConnection(); $record = new Records($db); if(!empty($_POST['action']) && $_POST['action'] == 'listRecords') { $record->listRecords(); } if(!empty($_POST['action']) && $_POST['action'] == 'addRecord') { $record->name = $_POST["name"]; $record->age = $_POST["age"]; $record->skills = $_POST["skills"]; $record->address = $_POST["address"]; $record->designation = $_POST["designation"]; $record->addRecord(); } if(!empty($_POST['action']) && $_POST['action'] == 'getRecord') { $record->id = $_POST["id"]; $record->getRecord(); } if(!empty($_POST['action']) && $_POST['action'] == 'updateRecord') { $record->id = $_POST["id"]; $record->name = $_POST["name"]; $record->age = $_POST["age"]; $record->skills = $_POST["skills"]; $record->address = $_POST["address"]; $record->designation = $_POST["designation"]; $record->updateRecord(); } if(!empty($_POST['action']) && $_POST['action'] == 'deleteRecord') { $record->id = $_POST["id"]; $record->deleteRecord(); } ?>