so the form is form_tag('admin/otherPage')...which by default makes it a
post. And the button is nested within the form, which implies that it posts
when the submit button is hit.
This deviates from the actual question, which is, why is the post method
being recognized when it is being directed from another page
i.e I log in from user/login -> admin/otherPage....and as soon as the
admin/otherPage temp is loaded, it executes the if($this->getRequest()->
isMethod('post'))
condition.
Any further explanations?
On Mon, May 3, 2010 at 8:41 PM, Eno <[email protected]> wrote:
> On Mon, 3 May 2010, Parijat Kalia wrote:
>
> > I have a webpage, where some content is loaded when the page is loaded,
> and
> > the other action is performed when the submit button is hit...
> > the code behind in the action is
> >
> > if($this->getRequest()->isMethod('post')) {
> > echo "hello" ; // *for testing purposes*
> >
> > }
> >
> > When the page loads (it is a redirect from another page
> > $this->redirect(modules/currentpage)). However, at this point, it does
> get
> > into the above *if condition*, which clearly means that it understands
> this
> > as a post, since it echoes out "hello". Now this should not happen, since
> > the post occurs only when the 'SUBMIT' button is hit, and not when the
> page
> > loads itself.
>
> Just because a form has a SUBMIT button doesn't automatically mean its a
> POST. The method attribute in the form tag governs how a form is
> processed, and has nothing to do with the SUBMIT button.
>
>
>
> --
> A
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<symfony-users%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en