Jump to content

Grab data from one form to another


ShaolinF

Recommended Posts

Hi Guys,

 

I have a text box which I am using for inputting quantity and I have a unencrypted paypal buy now button. Here is the code for the 2 forms:

 

 

PAYPAL:

<input type="hidden" name="undefined_quantity" value="1">

 

No Of Tickets:

    <LABEL for="ticketno">How many tickets would you like: </LABEL><BR>

              <INPUT type="text" id="ticketno" size="25"><BR><BR>

 

Now what I want to do is when I press the paypal button I want to quantity of the quantity field added to the paypal quantity field.

Im thinking of using a php script to grab the field data and paste it into the specified field. But Im not entirely sure how I can do it so I need your help!  ;D

Link to comment
https://forums.phpfreaks.com/topic/72997-grab-data-from-one-form-to-another/
Share on other sites

you posting the value from the previous form into a new form?

 

what you have to do on the second form is simple

 

say your first form is

 

<form action="<wherever you want the data sent to>">
<INPUT type="text" name="ticket">
</form>

 

then what you'd have to do on the second form

 

is like this

 

<INPUT type="text" name="2nd form's field" value="<?php echo="$_POST['ticket']"; ?>">

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.