Jump to content

Recommended Posts

As I have prefaced every one of my bonehead posts on this forum, I am relatively new to PHP, so I am sure that the following is pretty rudimentary, but it is very hard to find answers sometimes in the PHP books.  This forum has been great!

 

I have a website that has 2 forms on one page.  One form inputs a bunch of data and makes some calculations which are displayed.

A second form allows you to choose a few of these displayed calculations and do some more calculations with those numbers.

 

The problem is that when I click the submit button on the second form, the first form does a whole new set of calculations.  It doesn't hurt the results, but it looks sloppy.

 

Both forms use if(array_key_exists).  I think that after the first form is submitted, its array_key still exists, so that when the second form submit button is hit, the first form is processed.

 

Is there some way to kill or erase an array_key after a form is processed.

 

Or is there another way to do what I am trying to do.

 

Link to comment
https://forums.phpfreaks.com/topic/66869-more-than-one-form-on-a-page/
Share on other sites

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.