Date: 12/22/99
- Next message: Kristian Köhntopp: "Re: [PHPLIB] Sql_Query and $base"
- Previous message: Davis, Ricardo C.: "[PHPLIB] Is it possible to send an object variable as a POST argument"
- In reply to: Davis, Ricardo C.: "[PHPLIB] Is it possible to send an object variable as a POST argument"
- Next in thread: Kristian Köhntopp: "Re: [PHPLIB] Is it possible to send an object variable as a POST argument"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Well, sure you could call rawurlencode() on the result of calling
serialize() on an object. However, this doesn't seem like the best way. It
all depends on your exact needs. You could also
use $sess->register() to save the object as part of the session state so
that when the new page loads it will be available
or create a separate object (maybe a simple array) which holds only the
data that needs to get moved from page to page. Then serialize or register
this object, and pass it to the constructor of your larger object. The
reason you might want to do this is that often most of the data associated
with an object is the same from instance to instance, and if you use the
standard PHP serialize() function, you'll wind up passing more data than
you need around.
Unless, of course, you use the PHPLIB serialize() and set perisistent_slots
to only a few values.
OK, that wound up being a much more convoluted message than I had hoped.
Hope it was still clear...
Eric
At 07:50 PM 12/22/99 -0500, Davis, Ricardo C. wrote:
>Merry Christmas everyone!
>
>I'm trying out PHPLIB ... it appears to be a great timesaver. I'm used to
>doing some these things (like form field validation) by hand every time with
>ASP.
>
>I have a question, though. I'm used to doing form validation in a separate
>script file, then redirecting based on the result. Is it possible to pass
>my form object as a POST argument and on submit do the validation in a
>separate script file?
>
>-Ricardo
>-
>PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
>To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
>the body, not the subject, of your message.
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.
- Next message: Kristian Köhntopp: "Re: [PHPLIB] Sql_Query and $base"
- Previous message: Davis, Ricardo C.: "[PHPLIB] Is it possible to send an object variable as a POST argument"
- In reply to: Davis, Ricardo C.: "[PHPLIB] Is it possible to send an object variable as a POST argument"
- Next in thread: Kristian Köhntopp: "Re: [PHPLIB] Is it possible to send an object variable as a POST argument"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

