Pass parameter to new page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert

    #1

    Pass parameter to new page

    With psp, how can I go to another page and pass a parameter to it?

    Thanks, Robert


  • Robert

    #2
    Re: Pass parameter to new page

    Sorry, I meant php.

    "Robert" <nospam@spamfre e.com> wrote in message
    news:FnNSf.2470 $uX5.1060@torna do.texas.rr.com ...[color=blue]
    > With psp, how can I go to another page and pass a parameter to it?
    >
    > Thanks, Robert
    >[/color]


    Comment

    • Ian Collins

      #3
      Re: Pass parameter to new page

      Robert wrote:[color=blue]
      > Sorry, I meant php.
      >[/color]
      :)[color=blue]
      > "Robert" <nospam@spamfre e.com> wrote in message
      > news:FnNSf.2470 $uX5.1060@torna do.texas.rr.com ...
      >[color=green]
      >>With psp, how can I go to another page and pass a parameter to it?
      >>[/color][/color]
      You could pass the information in a session.

      --
      Ian Collins.

      Comment

      • matteo

        #4
        Re: Pass parameter to new page

        you can pass parametres in main 3 ways:

        direcot ways

        session()
        HTTP_GET
        HTTP_POST

        sesison writes a cookie in your system
        HTTP_GET uses the GET method
        HTTP_POST uses the post method

        Cheers

        Comment

        • Duderino82

          #5
          Re: Pass parameter to new page

          why not the simply redirect to:
          newpage.php?par ameter1=value&p arameter2=value

          and use a $_GET to process the parameters! I found it much easier and
          faster then using the session...maybe I'm wrong! (never much used
          sessions)

          Comment

          • ColdShine

            #6
            Re: Pass parameter to new page

            Robert in news:FnNSf.2470 $uX5.1060@torna do.texas.rr.com wrote:
            [color=blue]
            > With psp, how can I go to another page and pass a parameter to it?[/color]

            Shortest way: use HTTP 1.1 Redirect.

            header("Locatio n: http://$_SERVER[HTTP_HOST]" . full_path_to_de st_page .
            "?param=$value" );

            --
            ColdShine

            "Experience is a hard teacher: she gives the test first, the lesson
            afterwards." - Vernon Sanders law


            Comment

            • Gerard Matthew

              #7
              Re: Pass parameter to new page

              There needs to be some balance between security and speed. If you're
              looking for speed in your coding use $_GET but that's not recommended
              if you're concerned about security. Your other alternative is the
              $_SESSION global variable. Reference...
              http://www.php.net/manual/en/ref.session.php for more info.

              Regards,
              Gerard.

              Comment

              • Robert

                #8
                Re: Pass parameter to new page

                Got it! Many thanks to each of you.
                I am just learning this stuff, as you can easily see.

                Robert



                "Robert" <nospam@spamfre e.com> wrote in message
                news:FnNSf.2470 $uX5.1060@torna do.texas.rr.com ...[color=blue]
                > With psp, how can I go to another page and pass a parameter to it?
                >
                > Thanks, Robert
                >[/color]


                Comment

                Working...