SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Jun 2007
    Location
    London, United Kingdom
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Form submit problem

    Hi

    I am trying to submit data in a form to two different php files but i try adding in a second address in the action= field it doesn't work.

    here is what I have:

    <form name="frm_63681eef6d" id="frm_63681eef6d" method="POST" enctype="multipart/form-data" action="pay2.php" onSubmit="return false;">

    I need the data from one of the input fields in this form to be echoed onto another page and still be submitted to the database using another php file so i need to be able to post the data to 2 places at once.

    Any ideas?

    Thanks

    Mark

  2. #2
    SitePoint Addict
    Join Date
    May 2005
    Location
    London, ON
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Pretty sure that you can't use two actions.

    Why not do something like:

    1) POST the data to your script that puts the data in the database.
    2) Assuming you haven't outputted anything from the script, just change the header to the other file making sure you send along the variable it needs.
    Ryan Price
    Subscribe to my blog for regular tips and tricks

  3. #3
    SitePoint Addict
    Join Date
    Sep 2005
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can also consider just including the other php file after you process it with the first file as long as you don't change the $_POST["variable"]
    PHP Shopping Cart Software Easy Ecommerce Shopping Cart Script.
    PHP Super Cart is 100% template driven.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •