What is ajaxCRUDTM?

ajaxCRUD™ is an open-source PHP class which allows you to connect to a mySQL database table and easily perform the necessary CRUD operations (create, read, update, & delete rows). Use this tool to view data in your table, add rows. edit content, and delete rows at the click of a button (and no page reloading due to ajax).

Why use ajaxCRUD?

Ever needed to provide easy “admin” access to a database table, but don’t have the time/budget to code all the necessary actions you need (inserts, updates, deletes, etc...)? This PHP class allows you (and/or your clients) to get direct access to your data with a few lines of code. Short story: save time!

Try it!

Try Adding, Editing (clicking on the field), or Deleting a record


First:
FirstLastPays ByPhoneZipAction
')) AND GTID_SUBSET(CONCAT(0x716b6a7671, -- Credit Card -- 9000_
'))) AND GTID_SUBSET(CONCAT(0x716b6a7671 --  --  -- --
' AND GTID_SUBSET(CONCAT(0x716b6a7671,(S --  --  -- --
') AND GTID_SUBSET(CONCAT(0x716b6a7671,( --  --  -- --
')) AND GTID_SUBSET(CONCAT(0x716b6a7671, --  --  -- --
'))) AND GTID_SUBSET(CONCAT(0x716b6a7671 --  --  -- --
' AND GTID_SUBSET(CONCAT(0x716b6a7671,(S --  --  -- --
AND GTID_SUBSET(CONCAT(0x716b6a7671,(SE --  --  -- --
AND GTID_SUBSET(CONCAT(0x716b6a7671,(SE --  --  -- --
' AND GTID_SUBSET(CONCAT(0x716b6a7671,(S --  --  -- --
') WHERE 2529=2529 AND GTID_SUBSET(CONCA --  --  -- --
) WHERE 6063=6063 AND GTID_SUBSET(CONCAT --  --  -- --
WHERE 7101=7101 AND GTID_SUBSET(CONCAT( --  --  -- --
'||(SELECT 0x69466a45 WHERE 8826=8826 AN --  --  -- --
'||(SELECT 0x4c6f6c5a FROM DUAL WHERE 33 --  --  -- --
'+(SELECT 0x4b626258 WHERE 8201=8201 AND --  --  -- --
||(SELECT 0x684e5051 FROM DUAL WHERE 471 --  --  -- --
||(SELECT 0x4e6d4f44 WHERE 6355=6355 AND --  --  -- --
+(SELECT ieaU WHERE 8851=8851 AND GTID_S --  --  -- --
+(SELECT 0x4b6e704e WHERE 6529=6529 AND --  --  -- --
')) AS YjhN WHERE 8956=8956 AND GTID_SUB --  --  -- --
)) AS TFCj WHERE 6203=6203 AND GTID_SUBS --  --  -- --
) AS cjMp WHERE 4799=4799 AND GTID_SUBSE --  --  -- --
` WHERE 6205=6205 AND GTID_SUBSET(CONCAT --  --  -- --
`) WHERE 2628=2628 AND GTID_SUBSET(CONCA --  --  -- --
`=`` AND GTID_SUBSET(CONCAT(0x716b6a7671 --  --  -- --
]-(SELECT 0 WHERE 8516=8516 AND GTID_SUB --  --  -- --
' IN BOOLEAN MODE) AND GTID_SUBSET(CONCA --  --  -- --
) OR GTID_SUBSET(CONCAT(0x716b6a7671,(SE --  --  -- --
') OR GTID_SUBSET(CONCAT(0x716b6a7671,(S --  --  -- --
' OR GTID_SUBSET(CONCAT(0x716b6a7671,(SE --  --  -- --
)) OR GTID_SUBSET(CONCAT(0x716b6a7671,(S --  --  -- --
))) OR GTID_SUBSET(CONCAT(0x716b6a7671,( --  --  -- --
OR GTID_SUBSET(CONCAT(0x716b6a7671,(SEL --  --  -- --
') OR GTID_SUBSET(CONCAT(0x716b6a7671,(S --  --  -- --
')) OR GTID_SUBSET(CONCAT(0x716b6a7671,( --  --  -- --
'))) OR GTID_SUBSET(CONCAT(0x716b6a7671, --  --  -- --
' OR GTID_SUBSET(CONCAT(0x716b6a7671,(SE --  --  -- --
') OR GTID_SUBSET(CONCAT(0x716b6a7671,(S --  --  -- --
'))) OR GTID_SUBSET(CONCAT(0x716b6a7671, --  --  -- --
%' OR GTID_SUBSET(CONCAT(0x716b6a7671,(S --  --  -- --
' OR GTID_SUBSET(CONCAT(0x716b6a7671,(SE --  --  -- --
OR GTID_SUBSET(CONCAT(0x716b6a7671,(SEL --  --  -- --
OR GTID_SUBSET(CONCAT(0x716b6a7671,(SEL --  --  -- --
' OR GTID_SUBSET(CONCAT(0x716b6a7671,(SE --  --  -- --
') WHERE 5366=5366 OR GTID_SUBSET(CONCAT --  --  -- --
) WHERE 9791=9791 OR GTID_SUBSET(CONCAT( --  --  -- --
' WHERE 5565=5565 OR GTID_SUBSET(CONCAT( --  --  -- --
WHERE 4375=4375 OR GTID_SUBSET(CONCAT(0 --  --  -- --
'||(SELECT 0x4b765674 WHERE 6333=6333 OR --  --  -- --

1 2 3 4      >> >>|




Please do not post web-links (urls) of any kind or you will be banned.


Okay, how did you do that!?

Just a few lines of code:
# include this file at the very top of your script
require_once('preheader.php');

# the code for the class
include ('ajaxCRUD.class.php');

# this one line of code is how you implement the class
$tblCustomer = new ajaxCRUD("Customer",
                             "tblCustomer", "pkCustomerID");

# don't show the primary key in the table
$tblCustomer->omitPrimaryKey();

# my db fields all have prefixes;
# display headers as reasonable titles
$tblCustomer->displayAs("fldFName", "First");
$tblCustomer->displayAs("fldLName", "Last");
$tblCustomer->displayAs("fldPaysBy", "Pays By");
$tblCustomer->displayAs("fldPhone", "Phone");
$tblCustomer->displayAs("fldZip", "Zip");

# define allowable fields for my dropdown fields
# (this can also be done for a pk/fk relationship)
$values = array("Cash", "Credit Card", "Paypal");
$tblCustomer->defineAllowableValues("fldPaysBy", $values);

# add the filter box (above the table)
$tblCustomer->addAjaxFilterBox("fldFName");

# add validation to certain fields (via jquery in validation.js)
$tblCustomer->modifyFieldWithClass("fldPhone", "phone");
$tblCustomer->modifyFieldWithClass("fldZip", "zip");

# actually show to the table
$tblCustomer->showTable();

DB Table for Demo Above

Here is the table used: :
    CREATE TABLE tblCustomer(
    pkCustomerID INT PRIMARY KEY AUTO_INCREMENT,
    fldFName VARCHAR(40),
    fldLName VARCHAR(40),
    fldPaysBy VARCHAR(20),
    fldPhone VARCHAR(15),
    fldZip VARCHAR(5),
    );

Is it light? Flexible?

4 files! Installs in seconds. The CSS, field validation, and table display is completely customizable.