ajaxCRUD.com
» a PHP class to Create, Read, Update, & Delete from a mysql database table using AJAX
by loud canvas mediaAjaxCRUD Class Documentation / Reference Material
|
<< Reference overview << Home Object: ajaxCRUDConstructorFunctions
Variables |
onFileUploadExecuteCallBackFunctioncalls a local function when a file is uploaded
void onFileUploadExecuteCallBackFunction ( String functionName )
use this function when you want to apply certain logic (or display a certain message) when a file is uploaded. Use of this function is similiar in a way to a java interface: you must define a function with the name specifed in the function call. This function must take ONE parameter (an array). The indexes of this array are as follows: Details
Parameters
Example
$demo->setFileUpload("fldFilename");
$demo->onFileUploadExecuteCallBackFunction("uploadDocument");
function uploadDocument($array){
$id = $array[id]; //this will always be the value
$id = $array[pkID]; //same as above IF the pk is pkID
$fileName = $array[fileName];
$fileSize = $array[fileSize];
$fileType = $array[fldType];
if ($fileName != ''){
$success = qr("UPDATE tblDemo SET fldFilesize = '$fileSize'
WHERE pkDemoID = $id");
}
}
See also |
"ajaxCRUD is wonderful."
~Peter Barone
