This was one of those moments where you ask "Why did I do that" for what I did with the $_SESSION variable. I was adjusting a report to put a header and footer on it and needed to pass information into the header when ever a new page was created. (This is using FPDF to create a PDF page) I started to try to pass it by $_POST, but that didn't work and also I wasn't submitting a new page, this was done on the loading of the page. So I used the $_SESSION variable to pass the information. But when I was trying to set the name of the variable, I used () to encompass the variable name and it keept giving me errors. Finally when I was looking up why it wasn't working, I read a page where someone was having the same troubles and one response he got was to try using [] instead of (). So that made me wander if that was what I did, and what would you know, it was. Boy I felt dumb after that for making a simple error like that. But I guess everyone has those moments every once and a while.
I should have more stuff to post the next week and a half as I am revamping a report like system that I created when I first started here and not knowing anything of how things ran and how people where use to seeing things. I worked with a couple of the managers that go out to the parks we own to get a new look designed and cut out all the extra stuff. So it's a shorter report, and will have more vital information that is needed to be seen in a short amount of time. So I'm sure I'll have things to say about that.
No comments:
Post a Comment