I can get a parameter('id' for example) by $request->getParameter('id');
but if I use a form to POST the id, how could I get its value? $request->getParameter('id'); doesn't work.
sfWebRequest has getPostParameter(name, default)
In the Form, the Post Parameter Name is (by default): Model[colum name]
For example:
<input type="text" id="user_email" name="user[email]">
In the Action (after post):
$request->getPostParameter('user[email]');
Note: $request is the type sfWebRequest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With