Welcome Guest, Not a member yet? Register   Sign In
Cannot access request values from controller
#1

Hello guys, I stuck with accessing my request.
Here's from:
<form action="http://****/ajax/" method="POST">
    <label for="fname">First name:</label><br>
    <input type="text" id="fname" name="fname"><br>
    <label for="lname">Last name:</label><br>
    <input type="text" id="lname" name="lname">
    <input id="send" type="submit" value="send">
</form>


Controller method:
    public function ajaxTest()
    {
        $fname = $this->request->getVar('fname');
        print($fname);
    }
Reply
#2

Btw if I make form action='baseurl/public/test.php'
I can print_r($_POST) without any problems
Reply




Theme © iAndrew 2016 - Forum software by © MyBB