Is it possible for a PHP script to create form and then POST it without the user having clicked anything?

For example, I want the user to confirm something. If the user confirms, I have to create a record and then post to a different page.

Thank you very much

    1. display a from to the user
    2. user fills out form and submits
    3. the form handler script validates the posted data and sticks it into a [man]session[/man]
    4. display a confirmation form (or error) to user
    5. the form handler for the confirmation form sticks the session data into the database and either displays a "thank you" message or use [man]header[/man] to re-direct to a separate "thnak you" page.

      Under normal circumstances, this would work fine, but I need to post the data to a PayPal form, and I cannot get them to retrieve the data from a session. I actually need to post the form. Can I do that with a header command? Or perhaps an fwrite command? If so, do you have an example?

      Thank you.

      Melville

        PayPal, and most other payment gateways, do not necessarily require that the data be POSTed. you can simply send GET variables on the URL string. this can be sent via the [man]header[/man] fucntion.

          Write a Reply...