Jump to content

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].

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.