Re: Newbie question about Class
| From: | Al | Date: | Wed, 15 Oct 2003 18:15:17 +0000 |
| Subject: | Re: Newbie question about Class | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-166236@lists.php.net to get a copy of this message | ||
I was afraid that was the case.
Tom Rogers wrote:
Hi, Thursday, October 16, 2003, 3:35:56 AM, you wrote: A> My question seems fundamental. I want to set a variable in one function A> in a class and then want to use the value in a second function. A> However, the functions are called a html page with two passes. Submit A> reloads the page and an if(...) calls the second function in the class. A> If I declare on the first run:A> $get_data = new edit_tag_file(); A> $edit_args= $get_data-> edit_prep();A> The on the second pass, I'm stuck. I can't declare a new instance of A> "edit_tag_data". A> And, it appears the object is gone after I leave the page. A> Will the class structure do this for me or must I save the values in A> $GLOBAL or something? A> Thanks.... You need to pass the values to the next page or save them in a session