Matt Monaco wrote:
What is the best way to pass an object between pages? Currently I am
first
serializing, then doing a base64_encode, this doesn't seem entirely
efficient. (Especially the encode).
I am however using the encode because I have the serialized object as the
value of a hidden form
On Friday 25 November 2005 20:44, Matt Monaco wrote:
> What is the best way to pass an object between pages? Currently I am
> first
> serializing, then doing a base64_encode, this doesn't seem entirely
> efficient. (Especially the encode).
>
> I am however using the encode because I have the seri
I know the functions don't need to be copied. I would like to easily
transport the objects (not the class) between pages using a form. I'm
pretty sure the serialize() function can't be avoided (otherwise all that
will be passed is a string with a value like "Object ID: #55") but how can I
get
Well the functions won't need to be copied, but can't you put
the properties into a MySQL or other database? Then on a page that you need
the properties you pull them from the table?
On 11/25/05, Matt Monaco <[EMAIL PROTECTED]> wrote:
>
> I mean the object itself, not the class (the file containin
I mean the object itself, not the class (the file containing the class
definition is included on all necessary pages with
require_once("file.inc.php");
I want to create an object on one page ($obj = new MyClass();) and have it
on other pages, all members and functions intact.
Matt
"Unknown
Do you mean passing the class statement or the vars? couldn't you format the
vars into mysql and pull them?
On 11/25/05, Matt Monaco <[EMAIL PROTECTED]> wrote:
>
> What is the best way to pass an object between pages? Currently I am
> first
> serializing, then doing a base64_encode, this doesn't
What is the best way to pass an object between pages? Currently I am
first
serializing, then doing a base64_encode, this doesn't seem entirely
efficient. (Especially the encode).
I am however using the encode because I have the serialized object as the
value of a hidden form element. I can only
* Thus wrote Webmaster ([EMAIL PROTECTED]):
> Hi,
>
> I am just starting to understand how the session handling routines work in
> php.
> I can pass objects to other scripts. So I can put the language into the
> object that the visitor chose at the very first page.
> But what if a visitor bookmark
Webmaster wrote:
Hi,
i am using the smarty template engine.
Here is the problem that I would like to ask about:
function initTop(&$page, $array)
{
for ($i=0; $iassignVars(, $array[$i])
}
}
The function is supposed to know which object's attributes she is supposed
to change. Do I have to pass
[snip]
How can I guarantee that a language is always choosen? I mean how is
this
done professionally?
What do I have to write at the beginning of every page?
[/snip]
You have a bunch of options.
on each page you could add something like this to everypage:
if (!isset($_SESSION['language'])){
Hi,
I am just starting to understand how the session handling routines work in
php.
I can pass objects to other scripts. So I can put the language into the
object that the visitor chose at the very first page.
But what if a visitor bookmarked my homepage and comes back after a few
weeks.
How can I
Hi,
i am using the smarty template engine.
Here is the problem that I would like to ask about:
function initTop(&$page, $array)
{
for ($i=0; $iassignVars(, $array[$i])
}
}
The function is supposed to know which object's attributes she is supposed
to change. Do I have to pass the object as a
On Sun, 2003-06-22 at 23:20, Gerard Samuel wrote:
> Im trying to pass an object into functions and class methods, and for some
> reason, Im unable to access the object's methods.
> When I var_dump() the object, its a valid object with the function or
> class method.
> When I check via get_class_me
Im trying to pass an object into functions and class methods, and for some
reason, Im unable to access the object's methods.
When I var_dump() the object, its a valid object with the function or
class method.
When I check via get_class_methods, all the methods are there, from
within the function
ðÒÉ×ÅÔ!
Marek Kilimajer wrote:
> This won't work, you must register it within a session, just remember to
> declare the class befor session_start()
This can be pretty risky if your object contains references to external
objects. Works okay for insulated instances, though. Yet I would suggest
ðÒÉ×ÅÔ!
Alexander Ross wrote:
> If $this is an object, can I have the following link?
>
> Process
>
> Will the URL become too long? Will teh info get passed correctly? thanks
>
99% you are right, it will definitely be too long for a GET. Besides,
before writing the process_this.php?this=$th
This won't work, you must register it within a session, just remember to
declare the class befor session_start()
Alexander Ross wrote:
>If $this is an object, can I have the following link?
>
>Process
>
>Will the URL become too long? Will teh info get passed correctly? thanks
>
>Alexander Ross
If $this is an object, can I have the following link?
Process
Will the URL become too long? Will teh info get passed correctly? thanks
Alexander Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Well, PHP has 'sessions' which allow you to do just what you are asking,
pass variables between multiple pages. Sessions are somewhat like cookies,
but all data is stored on the server instead of the client, so you don't
have to rely on the user to accept your cookie.
Here's a short intro/tutori
I'm pretty new to PHP. If anyone can elaborate a little on this I would
appreciate it greatly.
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMA
On Saturday 26 January 2002 11:51, Dean Householder wrote:
> How can you pass an object from one page to another? Is there any
> convenient way to do it with PHP?
Yes, use sessions. See chapter on "Session handling functions".
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
Mu
How can you pass an object from one page to another? Is there any convenient way to
do it with PHP?
Dean
gt;
To: "Php-General (E-mail)" <[EMAIL PROTECTED]>
Sent: Friday, May 11, 2001 4:21 AM
Subject: [PHP] Passing Objects Vol II
> hmm well I tried it perhaps another step is in order. Once I can see
it
> work once I will be happy.
>
> //
hmm well I tried it perhaps another step is in order. Once I can see it
work once I will be happy.
//
// index.php contains:
//
client . "\n";
echo $myInstance->user . "\n";
echo $myInstance->password . "\n";
echo $myInstance->allowed . "\n";
24 matches
Mail list logo