» a PHP class to Create, Read, Update, & Delete from a mysql database table using AJAXby loud canvas media
AjaxCRUD Class Documentation / Reference Material
<< Reference overview
adds a button to every row and sends the id (pk) of that item to any url
Use this function to pass the primary key to another page (url) to do some other process. This function is very useful when your database has many-to-many relationships and you need to "attach" multiple items to an item.
By default the GET parameter for the primary key is passed to the page with the id being the primary key value. However, you can use the word "ALL" as an optional third parameter to have ALL fields and their values passed!
//this second example will pass ALL fields to the update form page
$tblDemo->addButtonToRow("Edit", "myOwnUpdateForm.php", "all");
//this third example will pass only the "myDBField" variable (and value) to the update page
$tblDemo->addButtonToRow("Edit", "myOwnUpdateForm.php", "myDBField");