1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Rep Power
    Is it possible to send form field values to two pages simultaniously. If so how?
  2. #2
  3. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Central Florida, USA
    Rep Power
    Not directly, but you could make your form submit to a page which then targets a second page. There are several ways to do it, some of which would use Javascript, but the easiest way would be to process your first formhandler in PHP, and then output a header which calls the second URL, with your variables appended.

    // this is the first formhandler page

    [do operations]$first_variable
    [do operations]$second_variable

    header ("Location: second_form_handler.php?third_variable=foo&fourth_variable=foo1");

    exit; //you should do this to make sure no other data is sent after the header

    If your variables are too complex to append to the URL easily, you should consider rawurlencoding, or...

    In your first formhandler, echo your remaining variables into hidden form fields to target the second formhandler, and use Javascript to do a <body onLoad="document.form.submit()"> action to submit your remaining data to the second page.

    [This message has been edited by rycamor (edited August 05, 2000).]

Similar Threads

  1. Passing POST variables
    By rlorenzo in forum PHP Development
    Replies: 11
    Last Post: June 6th, 2004, 03:00 PM
  2. Replies: 7
    Last Post: February 16th, 2004, 03:55 PM
  3. help with assigning variables, variable passing/ retrieval
    By pinkipodmini in forum PHP Development
    Replies: 0
    Last Post: February 13th, 2004, 10:40 PM
  4. Replies: 3
    Last Post: February 4th, 2004, 01:04 PM
  5. Replies: 0
    Last Post: January 8th, 2004, 08:55 PM

IMN logo majestic logo threadwatch logo seochat tools logo