Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
David Lantz: "Thank you, this is by far the simplest, and most friendly utility for building db record system I have ever used. I wish I could get my systems guys at the office to purchase this for our company would be so very helpful and speed up a lot of work. I for one have used it for everything from a simple inventory record of my house, to a members record for my church just little pet projects and a test bed to test my own db builds and theories before having to hand code at the office..... it is a lot of fun to work with".
Charles Phillips: "I very much like the program and all of its functionality! Would be happy to give you an endorsement or recommend it to others - saves me a ton of time".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

OnFileUpload

This event allows you to control file uploading. It fires on uploading a file with Upload file to folder and Upload image to folder editors.

 

Signature:

function OnFileUpload($fieldName, &$result, &$accept, $originalFileName,
                       $originalFileExtension, $fileSize, $tempFileName)

 

Parameters:

$fieldName

The name of currently processed column.

$rowData

The associative array of values that corresponds to the currently processed row.

$result

The actual file name (with full path). Change the value of this parameter to customize the filename.

$accept

Indicates whether the file uploading is allowed. Default value is true. Set $accept to false to cancel file uploading.

$originalFileName

The original file name (including extension)

$originalFileExtension

The original file extension

$fileSize

The file size

$tempFileName

The temporary filename of the file in which the uploaded file was stored on the server.

 

Example

This example shows how to add current date and time to the uploaded filename.

 

if ($fieldName === 'filename') {

    $newFileName = date('Y-m-d_H-i-s') . "_" . $originalFileName;

    $result = str_replace($originalFileName, $newFileName, $result);

    $handled = true;

}



Prev Return to chapter overview Next