PHP Classes

File: php/getPostRequest.php

Recommend this page to a friend!
  Classes of bamigboye biodun   Logical Functions   php/getPostRequest.php   Download  
File: php/getPostRequest.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Logical Functions
General-purpose PHP and JavaScript functions
Author: By
Last change:
Date: 8 months ago
Size: 960 bytes


Class file image Download
function getPostRequest(Array $postKeys){
        foreach (
$postKeys as $key ) {
array_key_exists($key, $_POST)){
$data = $_POST[$key];
           return [
'data' => $output, 'error' =>$errorLog];

// -- Usage
// Return Value
'data' => [
'name' => 'Biodun Bamigboye',
'email' => ''
'error' => ['keyNotPosted']
Author : Biodun Bamigboye

This function receives an indexed array of post key indexes
and returns an associative array of entered data and index
array for keys with no data existing.
Note That data is subjected to further tests by you before
saving it to db