$request->getParameter() offers more, than $_GET - for example, it
also has the post values, and allows them to be filtered via the
request.filter_parameters event. Even though $_GET works in most
cases, $request->getParameter() is the way to go. Check the
sfWebRequest class to see what's going on behind the courtain.

I believe Eno meant using multiple question marks in a query string by
incorrect. A valid one is like this:

    url?parameter1=value1&parameter2=value2...

So it has only one question mark, before the very first parameter,
after that the others are separated by an amperstand.

Check if you get the username and the page values correctly in
pages>=2, if not, your problem is the query string. If you do, then
your problem is most probably in the $this->getPager() function, not
in the code you showed us.

On Thu, Jun 10, 2010 at 06:41, Parijat Kalia <[email protected]> wrote:
> What's wrong with using $_GET, i have used it elsewhere with little trouble,
> also why would the query string format be wrong? Because it is the same
> format I follow everywhere else.
> Thanks!
>
> On Wed, Jun 9, 2010 at 9:12 PM, Eno <[email protected]> wrote:
>>
>> On Wed, 9 Jun 2010, Parijat Kalia wrote:
>>
>> > So in the summary of records page, when I click upon one of the students
>> > records, this students name is transferred to the detailed records page
>> > in
>> > the URL parameter.
>> > IN the detailed records page action, here is what I do
>> >
>> >  $username = $_GET['Name'];
>> >         $this->pager = $this->getPager($username);
>> >
>> > This pager displays data in the template, clearly with pagination,
>> > however,
>> > when I move to the next page  (page 2 , or 3, or 4), it fails to
>> > retrieve
>> > the necessary data for the page ....and displays zero questions....the
>> > pagination code is like:
>> >
>> > <?php if($pager->haveToPaginate()) { ?>
>> >
>> > <div class="pagination">
>> >     <a href="/questions/student?name=<?php echo $studentName;
>> > ?>?page=1">
>> >       <img src="/images/first.png" alt="First page" />
>> >     </a>
>>
>> Why are you using $_GET instead of $request->getParameter()?
>>
>> Maybe you need to read about controllers:
>>
>> http://www.symfony-project.org/gentle-introduction/1_4/en/06-Inside-the-Controller-Layer
>>
>> You also need to read up on what a query string is and how to format it
>> because your code above is incorrect.
>>
>> http://en.wikipedia.org/wiki/Query_string
>>
>>
>>
>> --
>>
>>
>> --
>> 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
>
> --
> 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
>

-- 
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

Reply via email to