Re: [PHP] Passing objects between pages

2005-12-01 Thread Jochem Maas
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

Re: [PHP] Passing objects between pages

2005-11-26 Thread Andy Pieters
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

[PHP] Passing objects between pages

2005-11-25 Thread Matt Monaco
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

Re: [PHP] Passing objects between pages

2005-11-25 Thread Unknown 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 seem

Re: [PHP] Passing objects between pages

2005-11-25 Thread Matt Monaco
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

Re: [PHP] Passing objects between pages

2005-11-25 Thread Unknown 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

Re: [PHP] Passing objects between pages

2005-11-25 Thread Matt Monaco
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

[PHP] Passing objects as a reference and extracting the index of an associative array.

2003-09-04 Thread Webmaster
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

[PHP] Passing Objects between scripts and guarateeing that a language has been choosen.

2003-09-04 Thread Webmaster
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

Re: [PHP] Passing Objects between scripts and guarateeing that a language has been choosen.

2003-09-04 Thread Matt Matijevich
[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'])){

Re: [PHP] Passing objects as a reference and extracting the index of an associative array.

2003-09-04 Thread John W. Holmes
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

Re: [PHP] Passing Objects between scripts and guarateeing that a language has been choosen.

2003-09-04 Thread Curt Zirzow
* 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

[PHP] Passing objects into methods or functions

2003-06-23 Thread Gerard Samuel
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

Re: [PHP] Passing objects into methods or functions

2003-06-23 Thread Lars Torben Wilson
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

[PHP] passing objects in url

2002-07-09 Thread Alexander Ross
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

Re: [PHP] passing objects in url

2002-07-09 Thread Marek Kilimajer
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

Re: [PHP] passing objects in url

2002-07-09 Thread Alberto Serra
ðÒÉ×ÅÔ! 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

Re: [PHP] passing objects in url

2002-07-09 Thread Alberto Serra
ðÒÉ×ÅÔ! 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

[PHP] Passing objects

2002-01-25 Thread Dean Householder
How can you pass an object from one page to another? Is there any convenient way to do it with PHP? Dean

Re: [PHP] Passing objects

2002-01-25 Thread Jason Wong
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

Re: [PHP] Passing objects

2002-01-25 Thread Dean Householder
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:

Re: [PHP] Passing objects

2002-01-25 Thread Jeff Sheltren
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

Re: [PHP] Passing Objects Vol II

2001-05-11 Thread Pavel Kalian
] 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

[PHP] Passing Objects Vol II

2001-05-10 Thread tcuhost
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