Mokoala v4.0

§ Basic Guides » $_POST, $_FILES and $_GET Data

For consistency $_POST, $_FILES and $_GET variables are accessed using the MK_Request::getPost() and MK_Request::getQuery() methods as seen in the example below.

print MK_Request::getQuery('page');

print MK_Request::getPost('keywords');

You can also choose to return a default value, where needed, by giving a second parameter.

print MK_Request::getQuery('page', 1);

Getting $_POST or $_GET

There may also be instances where you want to find either a $_POST / $_FILES or $_GET parameter. For this we use MK_Request::getParam(), which first checks to see if there is a $_POST / $_FILES value matching that key and then checks for a $_GET value matching that key.

print MK_Request::getParam('keywords');

Authenticating Users

Basic Guides

Handling Forms

Social Sign In

Using the Dashboard

Working With Data

levitra online