The Slim Framework support forum has moved to http://discourse.slimframework.com. This Tender forum is no longer maintained or monitored.

POST variables

neex1233's Avatar

neex1233

05 Mar, 2012 03:41 PM

If I'm trying to get a POST variable, should I just use $_POST['var'] or does Slim have a special way of doing this?

  1. 1 Posted by hexa2k9 on 05 Mar, 2012 04:59 PM

    hexa2k9's Avatar

    Hi,

    you can use the Request Object provided by Slim:
    http://www.slimframework.com/documentation/stable#request

    e.g.

    $var = $app->request()->post('var');
    

    Regards,
    Chris

  2. 2 Posted by neex1233 on 06 Mar, 2012 12:06 AM

    neex1233's Avatar

    Thanks!

  3. neex1233 closed this discussion on 06 Mar, 2012 12:06 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac