php-general Digest 9 May 2010 07:00:41 -0000 Issue 6734

Topics (messages 305013 through 305016):

dynamically generating and retrieving page data using flat files
        305013 by: David Mehler
        305014 by: Karl DeSaulniers
        305015 by: Al
        305016 by: Adam Richardson

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hello,
I've got a project that i have to reference information stored on one
page from another. This page I won't be visiting first, and at the
moment i'd prefer to use flat php files, but should that prove to hard
i'll transition to a mysql database. I'm looking for simplicity and
maintainability.
I've got a page of individuals, their names, positions, and a brief
summary of them. On the main page I want to put their names and
positions in an ordered list, pulling that information from the second
page. The idea is whenever the second page is updated the main page
will automatically update.
Suggestions welcome.
Thanks.
Dave.

--- End Message ---
--- Begin Message ---
Just a wild stab, but maybe hidden form fields and javascript pr php?

Karl


On May 8, 2010, at 8:41 PM, David Mehler wrote:

Hello,
I've got a project that i have to reference information stored on one
page from another. This page I won't be visiting first, and at the
moment i'd prefer to use flat php files, but should that prove to hard
i'll transition to a mysql database. I'm looking for simplicity and
maintainability.
I've got a page of individuals, their names, positions, and a brief
summary of them. On the main page I want to put their names and
positions in an ordered list, pulling that information from the second
page. The idea is whenever the second page is updated the main page
will automatically update.
Suggestions welcome.
Thanks.
Dave.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Karl DeSaulniers
Design Drumm
http://designdrumm.com


--- End Message ---
--- Begin Message ---


On 5/8/2010 9:41 PM, David Mehler wrote:
Hello,
I've got a project that i have to reference information stored on one
page from another. This page I won't be visiting first, and at the
moment i'd prefer to use flat php files, but should that prove to hard
i'll transition to a mysql database. I'm looking for simplicity and
maintainability.
I've got a page of individuals, their names, positions, and a brief
summary of them. On the main page I want to put their names and
positions in an ordered list, pulling that information from the second
page. The idea is whenever the second page is updated the main page
will automatically update.
Suggestions welcome.
Thanks.
Dave.


Consider using arrays. Give each individual a unique ID and use for your keys

Serialize() the array and put_file_contents()

file_get_contents and unserialize()

--- End Message ---
--- Begin Message ---
On Sat, May 8, 2010 at 9:41 PM, David Mehler <dave.meh...@gmail.com> wrote:

> Hello,
> I've got a project that i have to reference information stored on one
> page from another. This page I won't be visiting first, and at the
> moment i'd prefer to use flat php files, but should that prove to hard
> i'll transition to a mysql database. I'm looking for simplicity and
> maintainability.
> I've got a page of individuals, their names, positions, and a brief
> summary of them. On the main page I want to put their names and
> positions in an ordered list, pulling that information from the second
> page. The idea is whenever the second page is updated the main page
> will automatically update.
> Suggestions welcome.
> Thanks.
> Dave.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Well, if you're seeking to avoid the DB, you could just make sure the second
page is valid XHTML.  Then the first page could just run a quick script that
parses the XML of the second page to produce the data for the list on the
first page.

You could use simplexml (or dom, or the event parser, whatever you're
comfortable with) to grab the info from the elements of second page and use
the data as you need to in the generation of the first page.  Without much
work, you could even set up a short-term cache of the first page just so it
renders quickly most of the time.

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com

--- End Message ---

Reply via email to