» a PHP class to Create, Read, Update, & Delete from a mysql database table using AJAX

   by loud canvas media

Quick Links:

Quick Examples:

Show Checkbox - All

Consider the following table:

fldField1 VARCHAR(45),
fldField2 VARCHAR(45),
fldCertainFields VARCHAR(40),
fldLongField TEXT

 --  --
 --  --
 --  --

Class Implementation:

#required file and class
require_once ('preheader.php');
include_once ('ajaxCRUD.class.php')

#this one line of code is how you implement the class
$tblDemo = new ajaxCRUD("Item", "tblDemo", "pkID");


#define our checkboxes

#show header checkboxes
$tblDemo->showCheckboxAll('fldField1', true);
$tblDemo->showCheckboxAll('fldField2', true);

#for heck of it, only certain fields are allowed for fldCertainFields
$allowableValues = array("Allowable Value 1", "Allowable Value2",
                                             "Dropdown Value", "CRUD");
$tblDemo->defineAllowableValues("fldCertainFields", $allowableValues);

#disallow adding and deleting rows

#actually show the table

Read API Documentation on this function here.

View Example by Itself

Click here to view example outside of the template.


"I just wanted to take the time to say I have been looking for an ajax table for months, I probably could have built one by now. Ive seen and Ive tried many different ajax tables and I have to say this ones by far the "BEST" out there! Thank you so much Loud Canvas Media. for all of your hard work. AWESOME! AWESOME! 5 stars."

What is a business/commercial website?

A commercial website is one created for a business, for which purpose is generating revenue or cash flow of any type (and that isn't under a non-profit organization). So if you're selling a product, selling advertisement, selling a service, or just marketing a commercial business, your site is commercial. A company website is also commercial even if it doesn't sell anything, as it's purpose is to front a commercial company.