Jump to content

How to submit a form in php multiple times with a single submit button


alir22456
 Share

Recommended Posts

Hi,

This is a form for generating fee invoice for students that are enrolled in the classes. 

Current Situation (Picture 2): If I submit the form, the invoice is created for a specific month only (Only 1 record). (In this case only for the month of August)

(Picture 3): This was done by filling and submitting the form 4 times for each month. 

I wanted to figure out a way in which I can generate fee invoices for more than just one month (August, September, October, November etc.) by submitting the form only once.

Appreciate your help,

Thanks

 

Picture1.jpg

Picture2.jpg

Picture 3.jpg

Link to comment
Share on other sites

Without trying to decipher your pictures I will offer this.  A form is submitted from a page when a submit action occurs.  It only happens once.  Whatever is part of that form containing the submit action (button, input , js code) will be passed to the receiving script and that's it.  I would be wholly surprised if anyone else tells you of something else.

Does that give you something to consider?

  • Like 1
Link to comment
Share on other sites

Now that you've read my post let's try something to clarify what you are trying to do.

Instead of trying to relate your current coding attempts to us  just try to tell us what you are actually faced with.  In English without reference to forms, submits, pages, fields or any other 'programming' references.  Just the facts.  As in Day 1 of your task assignment or whatever this is.

Link to comment
Share on other sites

You have a form which has been designed to produce invoices one month at a time - there is only the option to enter a singlw month image.png.57fd7678931f8cd6c8b0214f00c96d3b.png

First thing to do is redesign the form to allow the specification of multiple months. For example

  • a month menu allowing multiple selections, or
  • 12 checkboxes, or
  • have fields to specify number of months and starting month (4 months starting at August)

Then change the processing of the submitted form to produce the invoice records for those months.

Link to comment
Share on other sites

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.

 Share

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