Why am I my losing my <textarea> data in the $_POST?
I am writing a script that will take some form data and present it in a PDF or some other printable format. At the bottom of the form is a "New Line" button. When you click this button a new line in the form appears, and the data in the previous line is added to an array named according to its label tag. My problem is that when the form is submitted the only data that ends up in the $desc[] array is what ever was entered in the last row. can someone please look over my code and see what I may have done wrong?
notice in the first example i gave my textarea tag a value attribute, this is invalid HTML and was being ignored and hence not set with the $_POST data
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
I guess all that matters is this person got their question answered
I've had something similar happen to me. I'll struggle with something for hours, and then finally relent and go to a forum (usually this one) and post about the problem. Then I'll go back and fight with it some more. I hate it when I do manage to figure it out on my own cuz now I've wasted everybody's time
The better I get at programming, the more I appreciate arrays. Handy dandy things they are.
It's sort of a manifestation of the "rubber duck effect", wherein just talking to someone about a problem and formulating the questions can often help you solve it yourself. (The name came from a programmer who supposedly put a rubber duck on top of his terminal so he could talk to it instead of bothering other developers.)
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
I tend to write down my questions before I go ask them, because I accumulate questions throughout the day and I think it's better to ask them all at once rather than a couple here, a couple there, etc. Some of the questions never make it to being asked because the sheer act of linguistically looking at the problem makes an idea pop in my head.
Perhaps describing a problem causes us to look at it in a different way?
The better I get at programming, the more I appreciate arrays. Handy dandy things they are.
Bookmarks