Jump to content

Keeping a variable for a second submit


Eggzorcist

Recommended Posts

SO here's my deal. I have a page with 2 submission buttons. The first, ask the number of fields required for the dataset. Which that submit1 creates the next form on the same page. Though, I tried re-using the $_POST variable to keep the amount of fields created to determine the amount of loops to go through for submission. But my problem is when the second submit button is pressed, that number variable is undefined. My question is how can I transmit the variable from the first form to the second?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/264184-keeping-a-variable-for-a-second-submit/
Share on other sites

Here's the breakdown.

 

I have form 1

 

Asks you how many fields?

turns into $_post['howmany'];

 

then I loop the form how many times...

 

But when I put it into the database, I want to keep the howmany variable. I use the same $_post but its unidentified since a new form has been submitted... How can I transmit this variable to the second submit and second script. Both forms are $_POST $_SERVER[php_SELF].

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.