Usually, when clicking on a 'submit' button, the form sends all the 'value' attributes within the form to the server. But is there a way to not send the 'value' attribute of form elements which are invisible (style="display:none")?
I don't know of any way to do this, but I have a suggestion: It sounds like you're using some dynamic content. Instead of hiding a field if you don't need it, just don't generate that field when you draw the form.
Include another fields which tells the server what your form is doing and have the server decide which information to ignore.
I guess I'll just use AJAX then. That way it only generates the form items it needs. I just thought there might be a way to disregard items which are not visible on the page. Thanks for the help.
I got it and the answers pretty simple too! Just add disabled="disabled" to the item and it won't be sent along with $_POST. How ironic that I was thinking of using AJAX or PHP when HTML could already do the trick for me. This proves that the right answer we're looking for is sometimes just under our noses. Thanks everyone!