Hi again, the only part I am not getting is the /* filter function */ part, I've searched in google for this, but haven't figured that part out.
What I think should be (but doesn't work so is not the right thing):
$source = array_filter($_POST, $eventlist);
$conditions = array();
foreach ($source as $field => $value)
// for queries
$conditions = $field . " = " . sql_escape($value);
// for (PDO) prepared statements
$conditions = $field . " = :" . $field;
$where = " WHERE " . implode(" AND ", $conditions);
$eventlist is a value set at the front end.
Because if I use the code like above here, I get the following error message:
Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in C:\xampp\htdocs\contactdatabase\contact_nbs\classes\export.class.php on line 77
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\contactdatabase\contact_nbs\classes\export.class.php on line 79