Add them starting with the first time you reference $month, and then keep adding them until you get to one that doesn't have the value. Or, start in the middle somewhere and do a binary search.print "1: input-month: \"$input{'month'}\"<BR>\n"; ... print "1: month: \"$month\"<BR>\n"; ... print "2: month: \"$month\"<BR>\n"; ...
-Make sure to number them or make them unique in some other way so that you can see correlate the output to the code.
-Although maybe not necessary here, quoting the value is useful in general when printing debugging html because you can clearly see extra spaces (newlines, etc.) in the value that get collapsed into a single space or ignored by the browser.
Just adding these print statements and identifying where the value is lost should make it clear to you what's going wrong. If it doesn't, then post the new code and note exactly where the value disappears and it might be clear to someone else here. It seems like such an ugly and stupid way of debugging but simple print statements are often the quickest way to find bugs of this sort.
In reply to Re: Re: Re: problem with variable
by blahblahblah
in thread problem with variable
by cal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |