Reply to Re: Passing objects between HMTL pages

Your name:

Reply:


Posted by flamer die.spam@hotmail.com on 10/10/06 23:12

djcredo@gmail.com wrote:

> Hi all,
>
> Suppose I have a "User" object intialized with user details I've
> obtained from a database. When the user navigates to another section of
> the site, I want that object to be available on that page.
>
> Which is the best way to pass that object?
>
> a) Through the Session variable
> b) By keeping the variable in a seperate file, and include_once() that
> file on every page
> c) Some form of serialization
> d) None of the above lol
>
> Thanks, I'm finding it tough getting to grips with OO PHP in a web
> environment.
> Matt

none of the above, if its an html document you can set
variables/session variables, if the document has a .php extension you
can do it, just do:

link: secondpage.php?var=$var
secondpage: $var = $_GET['var'];

if the docs are .html extensions then how exactly are you getting the
info from the database?

Flamer.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация