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
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
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
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 seem
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
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 containing
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
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; $isizeof($array)
{
$page-assignVars(, $array[$i])
}
}
The function is supposed to know which object's attributes she is supposed
to change. Do
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
[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'])){
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; $isizeof($array)
{
$page-assignVars(, $array[$i])
}
}
The function is supposed to know which object's attributes she is
* 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 bookmarked my
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
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
If $this is an object, can I have the following link?
a href=process_this.php?this=$thisProcess/a
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
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?
a href=process_this.php?this=$thisProcess/a
Will the URL become too long? Will teh info get passed
ðÒÉ×ÅÔ!
Alexander Ross wrote:
If $this is an object, can I have the following link?
a href=process_this.php?this=$thisProcess/a
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
ðÒÉ×ÅÔ!
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
How can you pass an object from one page to another? Is there any convenient way to
do it with PHP?
Dean
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
/*
Mum's
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:
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
]
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.
//
// index.php contains:
//
pre
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:
//
pre
?php
include( classes.inc );
$myInstance=new Main( $REMOTE_HOST , nick , zzyzx , true);
echo
24 matches
Mail list logo