Skip to content

Requests

Class for the requests are included inside the includes folder as data_handling.php.

use

use App\DataHandling;

to include the requests class.

$data = new DataHandling();

Use the below method to load the .env file data.

$data = new DataHandling();
echo $data->env->APP_NAME;

Using this method all the data inside the $_REQUEST php array can be fetched.

echo $data->request->username;
echo $data->request->password;

Using this method all the data inside the $_GET php array can be fetched.

echo $data->get->username;
echo $data->get->password;

Using this method all the data inside the $_POST php array can be fetched.

echo $data->post->username;
echo $data->post->password;

Using this method all the data inside the $_POST php array can be fetched.

echo $data->post->username;
echo $data->post->password;

Using this method all the data inside the $_SESSION php array can be fetched.

echo $data->session->username;
echo $data->session->password;

Using this method all the data inside the $_COOKIE php array can be fetched.

echo $data->cookie->username;
echo $data->cookie->password;