If you are arriving at this page via a post request than, the code in
the if statement will get run. I would recommend the following:
if($request->isMethod('post') && $request->hasParameter($form-
>getName())){
//code code code
}
Obviously, that will only get run when the form is posting to
Yes, that it is. It is being redirect to from the login page ...the login
page is a post, and then if the credentials are verified
I use this
$this->redirect(thisModule/thisPage)
but it is kind of strange that a post from another page is being redirected
here, because the post on the login page p
So when you navigate to the page, in what shou;d be a get request,
without submitting the form, the var_dump call dumps true? If that is
the case than there is something going on that is probably not symfony
related. It is possible to create link with symfony that will call
the page in a post req
All right...it did post a bool, that is truewhich has been the
case...here is the actionI am posting only until the
if($this->getRequest()->isMethod('post')) line...after that it's just code
execution...the template code follows after the action
* public function executeCreateQuestions()
add this code before the if statement:
var_dump($this->getRequest()->isMethod('post');
trigger_error("HERE",E_USER_ERROR);
that will dump the bool value from the method and then throw a fatal
error to halt the script.
If the dumped value is a bool true, than you are dealing with a post
request. A
No, that is sample code, not the actual code. still confused...
2010/5/5 Casey
> You are missing a parenthesis in the code above, could that be the
> issue, or was that only in your posting. Confirm you code looks like
>
> public function executeSomething(){
> if($this->getRequest()->isMethod('
You are missing a parenthesis in the code above, could that be the
issue, or was that only in your posting. Confirm you code looks like
public function executeSomething(){
if($this->getRequest()->isMethod('post')){
//do stuff
}
notice the 2 parenthesis in that code. As long as the form
One sec, can you give me the reasoning for that please?
I have several pages with forms that postacross all I have this
function executeSomething()
{
if($this->getRequest()->isMethod('post')
{
// post button action
}
}
all of these seem to be working, but when I load this particular
method declaration looks like
public function executeSomething(sfWebRequest $request)
OR
public function executeSomething()
? Try the first one.
Вы писали 5 мая 2010 г., 23:04:21:
>
Oh I tried that...it doesn't recognize the variable at all...what i did was
$request->isMethod('pos
Oh I tried that...it doesn't recognize the variable at all...what i did was
$request->isMethod('post')...so any clue?
On Tue, May 4, 2010 at 8:51 PM, fRAnKEnSTEin wrote:
> Hi there,
>
> If you are inside some controller action you can try "$request-
> >isMethod('post')" instead "$this->getRequ
Hi there,
If you are inside some controller action you can try "$request-
>isMethod('post')" instead "$this->getRequest()->isMethod('post')"
Tell me what happen if you give it a try...
Cheers
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-pro
11 matches
Mail list logo