PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have two forms within the same HTMl sheet (1 for updating a price and the second to actually output everything to an email). The issue I am having is that some key data like Quantity is in the first form and to stop the user from having to put in the same information twice I want to pull the Quantity data bit and put it so that it is outputted in the second form to the email.
The HTML in the first form full pulling the Quantity is:
I am able to do something like this (pulling the data from the form above and outputting on the HTML page...but how do I then translate these variables on the separate PHP code gathering the information and emailing?
You're asking how to do something HTML wasn't designed for. Users don't actually see the form, so why not have 1 big form, use 2 divs to divide them and use CSS to style the divs, this will create the visual appearance of two "input areas" while containing them to one HTML form.
I am not sure if the way I have it set up will allow that (which I then will have to change the way I have it set up). But currently I have it split into two forms because the first form enters a quantity and then the user hits an 'update' button to calculate the total. The form under that then collects all the other data.
Do I have to completely change my approach then? Cause obviously the coding conflicts because when I combine it into one form I can either only update the total or submit the form calling the PHP. Appreciate all the help!
landzir101 wrote:I am not sure if the way I have it set up will allow that (which I then will have to change the way I have it set up). But currently I have it split into two forms because the first form enters a quantity and then the user hits an 'update' button to calculate the total. The form under that then collects all the other data.
I couldn't think of why that would require 2 forms, in fact it sounds like 1 form is best.