summaryrefslogtreecommitdiff
path: root/tests/cpp/include/variables/024-get-post.h
blob: e615f0f7e0e56c409cba1af370b5a2f03e7c718d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
 *
 *  Test superglobal variables _GET & _POST
 *      024-get-post.phpt
 *
 */




/**
 *  Set up namespace
 */
namespace TestVariables {


    /*
     * Test 
     */
    void get_post(void)
    {
        Php::out << "_GET[a] = " << Php::GET["a"] << std::endl;
        Php::out << "_GET[b] = " << Php::GET["b"] << std::endl;
        Php::out << "_GET[ar][elm1] = " << Php::GET["ar"]["elm1"] << std::endl;
        Php::out << "_GET[ar][elm2] = " << Php::GET["ar"]["elm2"] << std::endl;

        Php::out << "_POST[c]   = " << Php::POST["c"] << std::endl;
        Php::out << "_POST[d]   = " << Php::POST["d"] << std::endl;
        Php::out << "_POST[e]   = " << Php::POST["e"] << std::endl;
        Php::out << "_POST[e][0]   = " << Php::POST["e"][0] << std::endl;
        Php::out << "_POST[e][1]   = " << Php::POST["e"][1] << std::endl;
    }

/**
 *  End of namespace
 */
}