PHP Scripts Development » PHP Classes Support Forum » MyPagina class Support forum

[my pagina] Add parameter in navigation's url

(7 posts)

Great offers not only for geeks!


  1. User has not uploaded an avatar

    fabrice
    Member

    Hi,

    I would to know, how I can add a (url)parameter in the navigation's function, like that :

    mypage.php?page=1&id=18&rep=myrep

    => function navigation($addUrl='', $separator = "|" ... ... ...);

    Regards,
    Fabrice

    Posted 4 months ago #
  2. You don't need that, the class takes care about existing query strings

    Posted 4 months ago #
  3. User has not uploaded an avatar

    fabrice
    Member

    hello,

    Ok, but I generate the parameters in the same page. And so, I build the pagination

    Regards,
    Fabrice

    Posted 4 months ago #
  4. Quote from: fabrice
    "hello,
    Ok, but I generate the parameters in the same page. And so, I build the pagination
    Regards,
    Fabrice"

    Are you able to post this parameter to the "first" page where the pagination is used?

    or try this:

    $_GET['id'] = 18;
    $_GET['rep'] = 'myrep';

    above the code where the class is called

    Posted 4 months ago #
  5. User has not uploaded an avatar

    fabrice
    Member

    Re :)
    No, passing my variables by $_GET don't work as well. But I if do this :

    $_SERVER['QUERY_STRING'].= 'selected_rep='.$Id.'|'.urlencode($Nom).'&ok=ok';

    , it's fine.

    But I really don't like....
    Have you an another more "elegant" solution ?. I think passing an extended urls (parameters) in the navigation's function is more efficient.

    Regards,
    Fabrice

    Posted 4 months ago #
  6. sure you can extend the class and modify the method

    function rebuild_qs($curr_var) {
    ...

    check this "multi" function here

    Posted 4 months ago #
  7. User has not uploaded an avatar

    fabrice
    Member

    Yes, I've already seen this function.

    And I'll modify the class.

    Regards,
    Fabrice

    Posted 4 months ago #

RSS feed for this topic

Reply

You must log in to post.