ajaxCRUD.com

» a PHP class to create / read / update / delete from a database table using AJAX

   by loud canvas media

AjaxCRUD API Reference

<< Reference overview
<< Home

addButtonToRow

adds a button to every row and sends the id (pk) of that item to any url
void addButtontoRow( String buttonValue, String URL, [ String $attach_params ] )
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!

Details

Type function
Returns void
Default no button

Parameters

buttonValue
Value for the button
URL
a web script (eg a php, .asp, .jsp file)

Example

$tblDemo->addButtonToRow("Edit", "myOwnUpdateForm.php", "all");

See also

New, Edit

 

"Sweet!!! One of the few packages that runs right out of the box. Just modify a couple of lines[s] [and] it runs perfectly."
~Mike