Communicating to server .php without using <form>

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

    #1

    Communicating to server .php without using <form>

    I'm trying to come up with a way within a client-side web page of uploading a couple files to a
    server-side PHP program without using a <form...>. I don't want to give up the page which happens
    after the <form...> executes. Instead, I want to upload the files, then execute a <form...> for
    another purpose. Any help would be appreciated.

    Thanks, Don


    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= East/West-Coast Server Farms - Total Privacy via Encryption =---
  • Randy Webb

    #2
    Re: Communicating to server .php without using &lt;form&gt;

    Don wrote:
    [color=blue]
    > I'm trying to come up with a way within a client-side
    > web page of uploading a couple files to a
    > server-side PHP program without using a <form...>.[/color]

    Why? Thats what a form is for.
    [color=blue]
    > I don't want to give up the page which happens
    > after the <form...> executes.[/color]

    Then don't. Simply have PHP redirect back to where you want to be by
    setting the appropriate Location Header.
    [color=blue]
    > Instead, I want to upload the files, then execute
    > a <form...> for another purpose.[/color]

    Huh? Why not just use one form, and let it handle both. The file uploads
    and "another purpose".




    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    • Don

      #3
      Re: Communicating to server .php without using &lt;form&gt;

      On Sun, 10 Oct 2004 16:04:59 -0400, Randy Webb <HikksNotAtHome @aol.com> wrote:
      [color=blue]
      >Don wrote:
      >[color=green]
      >> I'm trying to come up with a way within a client-side
      >> web page of uploading a couple files to a
      >> server-side PHP program without using a <form...>.[/color]
      >
      >Why? Thats what a form is for.
      >[color=green]
      >> I don't want to give up the page which happens
      >> after the <form...> executes.[/color]
      >
      >Then don't. Simply have PHP redirect back to where you want to be by
      >setting the appropriate Location Header.
      >[color=green]
      >> Instead, I want to upload the files, then execute
      >> a <form...> for another purpose.[/color]
      >
      >Huh? Why not just use one form, and let it handle both. The file uploads
      > and "another purpose".[/color]

      I'm not sure how to do what you propose. Maybe, I'm not making myself clear enough. Within a
      client-side page I need to upload several files to a server-side PHP program running on server A,
      then from within that same client-side page I need to submit some data to a different server-side
      PHP program running on server B.

      Thanks for your help.
      Don


      ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
      http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
      ---= East/West-Coast Server Farms - Total Privacy via Encryption =---

      Comment

      • Randy Webb

        #4
        Re: Communicating to server .php without using &lt;form&gt;

        Don wrote:[color=blue]
        > On Sun, 10 Oct 2004 16:04:59 -0400, Randy Webb <HikksNotAtHome @aol.com> wrote:
        >
        >[color=green]
        >>Don wrote:
        >>
        >>[color=darkred]
        >>>I'm trying to come up with a way within a client-side
        >>>web page of uploading a couple files to a
        >>>server-side PHP program without using a <form...>.[/color]
        >>
        >>Why? Thats what a form is for.
        >>
        >>[color=darkred]
        >>>I don't want to give up the page which happens
        >>>after the <form...> executes.[/color]
        >>
        >>Then don't. Simply have PHP redirect back to where you want to be by
        >>setting the appropriate Location Header.
        >>
        >>[color=darkred]
        >>>Instead, I want to upload the files, then execute
        >>>a <form...> for another purpose.[/color]
        >>
        >>Huh? Why not just use one form, and let it handle both. The file uploads
        >> and "another purpose".[/color]
        >
        >
        > I'm not sure how to do what you propose. Maybe, I'm not making myself clear enough. Within a
        > client-side page I need to upload several files to a server-side PHP program running on server A,
        > then from within that same client-side page I need to submit some data to a different server-side
        > PHP program running on server B.[/color]

        You can't do that in JS. Not easily anyway.

        Have Page1 submit to Server A, then have Server A submit to server B,
        get the results back and return those results to the Browser.


        --
        Randy
        comp.lang.javas cript FAQ - http://jibbering.com/faq

        Comment

        • Don

          #5
          Re: Communicating to server .php without using &lt;form&gt;

          On Sun, 10 Oct 2004 16:44:56 -0400, Randy Webb <HikksNotAtHome @aol.com> wrote:
          [color=blue]
          >Don wrote:[color=green]
          >> On Sun, 10 Oct 2004 16:04:59 -0400, Randy Webb <HikksNotAtHome @aol.com> wrote:
          >>
          >>[color=darkred]
          >>>Don wrote:
          >>>
          >>>
          >>>>I'm trying to come up with a way within a client-side
          >>>>web page of uploading a couple files to a
          >>>>server-side PHP program without using a <form...>.
          >>>
          >>>Why? Thats what a form is for.
          >>>
          >>>
          >>>>I don't want to give up the page which happens
          >>>>after the <form...> executes.
          >>>
          >>>Then don't. Simply have PHP redirect back to where you want to be by
          >>>setting the appropriate Location Header.
          >>>
          >>>
          >>>>Instead, I want to upload the files, then execute
          >>>>a <form...> for another purpose.
          >>>
          >>>Huh? Why not just use one form, and let it handle both. The file uploads
          >>> and "another purpose".[/color]
          >>
          >>
          >> I'm not sure how to do what you propose. Maybe, I'm not making myself clear enough. Within a
          >> client-side page I need to upload several files to a server-side PHP program running on server A,
          >> then from within that same client-side page I need to submit some data to a different server-side
          >> PHP program running on server B.[/color]
          >
          >You can't do that in JS. Not easily anyway.
          >
          >Have Page1 submit to Server A, then have Server A submit to server B,
          >get the results back and return those results to the Browser.[/color]

          That sounds like a good plan. Can I have Server A return the page sent back by Server B? Once
          Server A accepts the file uploads it will submit a form to Server B with other information, then the
          page returned by Server B needs to be returned to the client.

          Also, how do I create that form in PHP which Server A will send to Server B?

          Thanks, Don


          ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
          http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
          ---= East/West-Coast Server Farms - Total Privacy via Encryption =---

          Comment

          • Randy Webb

            #6
            Re: Communicating to server .php without using &lt;form&gt;

            Don wrote:[color=blue]
            > On Sun, 10 Oct 2004 16:44:56 -0400, Randy Webb <HikksNotAtHome @aol.com> wrote:
            >[/color]

            <--snip-->
            [color=blue][color=green]
            >>Have Page1 submit to Server A, then have Server A submit to server B,
            >>get the results back and return those results to the Browser.[/color]
            >
            >
            > That sounds like a good plan. Can I have Server A return the page sent back by Server B? Once
            > Server A accepts the file uploads it will submit a form to Server B with other information, then the
            > page returned by Server B needs to be returned to the client.
            >
            > Also, how do I create that form in PHP which Server A will send to Server B?[/color]

            Ask in comp.lang.php as there are people there that can tell you better
            than I can. I could dig through www.php.net and find what I was looking
            for but there may be a better way than what I would find.

            f'up set to comp.lang.php

            --
            Randy
            comp.lang.javas cript FAQ - http://jibbering.com/faq

            Comment

            • Don

              #7
              Re: Communicating to server .php without using &lt;form&gt;

              On Sun, 10 Oct 2004 17:05:29 -0400, Randy Webb <HikksNotAtHome @aol.com> wrote:
              [color=blue]
              >Don wrote:[color=green]
              >> On Sun, 10 Oct 2004 16:44:56 -0400, Randy Webb <HikksNotAtHome @aol.com> wrote:
              >>[/color]
              >
              ><--snip-->
              >[color=green][color=darkred]
              >>>Have Page1 submit to Server A, then have Server A submit to server B,
              >>>get the results back and return those results to the Browser.[/color]
              >>
              >>
              >> That sounds like a good plan. Can I have Server A return the page sent back by Server B? Once
              >> Server A accepts the file uploads it will submit a form to Server B with other information, then the
              >> page returned by Server B needs to be returned to the client.
              >>
              >> Also, how do I create that form in PHP which Server A will send to Server B?[/color]
              >
              >Ask in comp.lang.php as there are people there that can tell you better
              >than I can. I could dig through www.php.net and find what I was looking
              >for but there may be a better way than what I would find.
              >
              >f'up set to comp.lang.php[/color]

              Ok, I'll check with that group regarding the PHP form code. But, what are your thoughts regarding
              Server A returning Server B's returned page to the client?

              Thanks, Don


              ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
              http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
              ---= East/West-Coast Server Farms - Total Privacy via Encryption =---

              Comment

              Working...