Re: [PHP] Newbie question about Class

2003-10-17 Thread Rory McKinley
Hi Al

Sessions and objects are quite easy to use in the latest version of PHP, and
would be my personal recommendation. I have a coupleof test scripts that I
regularly
"mangle" when trying to see if something is doable...if you like, you can
contact me offlist and I will mail these to you and you can try it out for
yourself.

Regards

Rory McKinley
Nebula Solutions
+27 82 857 2391
[EMAIL PROTECTED]
"There are 10 kinds of people in this world,
those who understand binary and those who don't" (Unknown)
- Original Message - 
From: "Al" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 15, 2003 8:15 PM
Subject: Re: [PHP] Newbie question about Class


> 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
> >
> >
> >
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Newbie question about Class

2003-10-17 Thread Becoming Digital
> I was afraid that was the case. 

You've nothing to fear but fear itself.  Sessions are your friend.

Edward Dudlik
"Those who say it cannot be done
should not interrupt the person doing it."

wishy washy | www.amazon.com/o/registry/EGDXEBBWTYUU



- Original Message - 
From: "Al" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, 15 October, 2003 14:15
Subject: Re: [PHP] Newbie question about Class


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
>
>  
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Newbie question about Class

2003-10-15 Thread Al
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

 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Newbie question about Class

2003-10-15 Thread Tom Rogers
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

-- 
regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Newbie question about Class

2003-10-15 Thread Chris W. Parker
Al 
on Wednesday, October 15, 2003 10:36 AM said:

> Will the class structure do this for me or must I save the values in
> $GLOBAL or something?

I think you'd have to send the value via $_GET or save it in a session
variable if you want to retrieve it on another page.


Chris.

--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Newbie question about Class

2003-10-15 Thread Al
My question seems fundamental.  I want to set a variable in one function 
in a class and then want to use the value in a second function.  
However, the functions are called a html page with two passes.  Submit 
reloads the page and an if(...) calls the second function in the class.

If I declare on the first run:
   $get_data = new edit_tag_file();
   $edit_args= $get_data-> edit_prep();
The on the second pass, I'm stuck.  I can't declare a new instance of 
"edit_tag_data".
And, it appears the object is gone after I leave the page. 

Will the class structure do this for me or must I save the values in 
$GLOBAL or something?

Thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php