Here's the deal: I want to take a value created in one function and pass it to another. How the hell do I do that? I'm so frustrated with this I'm about to go crazy. It seems like it should be so simple.
Basically, the situation is this: I'm creating a web application that allows the administrator of the site to make changes to the content presented on a page. They pick the page they want to edit and then they are given the paragraphs to edit. When they submit their changes, $PHP_SELF is called and another function is executed. (Based on a switch statement and the value passed from the form.) The trick is that there can be any number of paragraphs (the rows in my table) per page so function 2 doesn't know how many times to execute the update statement. I need to get function 1 to tell function 2 that there are X paragraphs that are going to be edited. Right now I'm just using a hidden value with the number of paragraphs to communicate between the functions, but there must be a better way. I could always get the value outside of function 1 by rerunning my query, but it seems that it would be an extra query to run. Is there any way to do this? TIA.