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

   by loud canvas media

AjaxCRUD Class Documentation / Reference Material

<< Reference overview
<< Home


constructor for instantiating the class
new ajaxCrud ( String buttonText, String dbTableName, String dbPrimaryKey, [ String ajaxcrudDir = ""] )
This constuctor is used to instantiate the PHP object. You must pass in the three required values and this will create your ajaxCRUD object!

The name of the item your database table is defining (eg for a table of people this value would be "Person")
This is the name of your database table
This is the primary key of the database table
Defaults to "". If you want to put your ajaxcrud file(s) elsewhere in your dir structure, change this variable (eg "../ajaxcrud")


Type constructor
Returns object


$tblDemo = new ajaxCRUD("Apple", "tblApples", "pkAppleID");

Example2: ajaxCRUD("Item", "ItemTable", "id") will yield an ADD button that says "Add Item"
Example3: ajaxCRUD("PERSON", "tblPerson", "pkPersonID") will yield an ADD button that says "Add PERSON"
Example4: ajaxCRUD("EMPLOYEE", "tblEmployee", "pkEmployeeID", "../ajaxcrud") // the php file that uses this must have all ajaxCRUD files in the ../ajaxcrud dir

See also

New, Edit


"GREEEAT functions! Easily understandable code, I`m loooovving it. Great work! :D "
~Svend Koustrup

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.