is this this the staff.php file and how do i run it on wamp?
is this this the staff.php file and how do i run it on wamp?
ignatius
Posts: 2Questions: 1Answers: 0
<?php
/*
* Example PHP implementation used for the index.html example
*/
// DataTables PHP library
include("/assets/inline/php/DataTables.php" );
// Alias Editor classes so they are easy to use
use
DataTables\Editor,
DataTables\Editor\Field,
DataTables\Editor\Format,
DataTables\Editor\Join,
DataTables\Editor\Upload,
DataTables\Editor\Validate;
// Build our Editor instance and process the data coming from _POST
'''Editor::inst( $db, 'datatables_demo' )
->fields(
Field::inst( 'first_name' )->validator( 'Validate::notEmpty' ),
Field::inst( 'last_name' )->validator( 'Validate::notEmpty' ),
Field::inst( 'position' ),
Field::inst( 'email' ),
Field::inst( 'office' ),
Field::inst( 'extn' )->validator( 'Validate::numeric' ),
Field::inst( 'age' )->validator( 'Validate::numeric' ),
Field::inst( 'salary' )->validator( 'Validate::numeric' ),
Field::inst( 'start_date' )
->validator( 'Validate::dateFormat', array(
"format" => Format::DATE_ISO_8601,
"message" => "Please enter a date in the format yyyy-mm-dd"
) )
->getFormatter( 'Format::date_sql_to_format', Format::DATE_ISO_8601 )
->setFormatter( 'Format::date_format_to_sql', Format::DATE_ISO_8601 )
)
->process( $_POST )
->json();
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Yes it is. It is included int he Editor PHP package download.
The PHP installation instructions are available here.
Allan
Still trying to figure my way around it will let you know the progress i make