Submitting form data to a different server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Msharma
    New Member
    • Oct 2006
    • 1

    Submitting form data to a different server

    Hello all,
    This is my first flirtation with PHP and I could use some help on this.
    This is what I'm trying to do. I capture data from an HTML form and catch the data in a PHP script. Now I want to submit this data to another form on a different server. I would appreciate any help and guidance on how to approach this.

    [HTML]<form name="survey_16 00" id="survey_1600 " method="POST" action="http://mel.afsc.org/photo_system/convio_catch.ph p">
    <p>First Name:
    <input type="text" name="cons_firs t_name" id="cons_first_ name" value=""
    size="15" maxlength="50" />
    </form>

    </p>

    <p> Last Name:
    <input type="text" name="cons_last _name" id="cons_last_n ame" value=""
    size="15" maxlength="50" />
    </br>
    </p>

    <p>Email:

    <input type="text" name="cons_emai l" id="cons_email " value=""
    size="15"
    maxlength="255" />

    </p>
    [/HTML]

    I catch the form data here
    Code:
    <?php echo $_POST['cons_first_name']; ?>
    <?php echo $_POST['cons_last_name']; ?>
    <?php echo $_POST['cons_email']; ?>
    Now I want to post this data to the form below. I was wondering if I could get any insight on this.

    Code:
    <form name="survey_1600" id="survey_1600" method="POST" action="http://secure2.convio.net/afsc/site/SSurvey"</form>
  • vssp
    Contributor
    • Jul 2006
    • 268

    #2
    you have to pass the hidden values another site and get the values another serevr

    vssp

    Comment

    • clov78
      New Member
      • Nov 2006
      • 1

      #3
      I have the same question. I'm not sure if I understand your reply. In my case, I have a form that collects some info, then I need to validate the form, so I pass the info to the php script and validate it. From there, I want to post the data to a different server (namely Paypal) without the user having to press the submit button on another form. Something like this:

      <form method="POST" name="informati on" action="somefil e.php">
      ...Get information via $_POST or $_GET
      ...validate information

      Information OK:
      Post to "https://www.paypal.com/cgi-bin/webscr"
      information not OK:
      Send user back to the information form and correct mistakes.

      What, exactly, is the command and sintax that I use to pass the info to the Paypal form?

      Thanks

      Comment

      Working...