RE: [PHP-DB] Transfering post data to a series of pages.
depending on what you want to do, here is an example of using functions in one page to make things happen http://www.weberdev.com/get_example-4085.html bastien From: "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: RE: [PHP-DB] Transfering post data to a series of pages. Date: Thu, 5 May 2005 07:07:06 -0500 After looking at what I wanted to do I see no good reason I can't do most of what we needed with function calls. The others can be handled with plugging more data into my session array. Somehow I thought this was a poor way of coding (I don't know why). Thank you everyone for your advice! - Matthew -Original Message- From: Brad Webb [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 04, 2005 12:21 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] Transfering post data to a series of pages. You may also consider using sessions to store form data.. this allows for actual user interaction with the data, back/forward etc... as well as tracking and other stuff.. you really should only have "Page1.php", and use a logic object to parse the data from there.. IMHO, of course. :) [EMAIL PROTECTED] wrote: >Perry, Matthew (Fire Marshal's Office) wrote: > > >>Is there a way to transfer post data to a series of PHP pages? >> >>For example, lets say I have the following 4 pages: >>Page1.php - this page has my original post form >>Page2.php - this page does one thing with the post data >>Page3.php - this page does another thing with the post data >>Page4.php - this page shows the results of everything I have done >> >>Right now I am using the header: >> >>The problem is, the following works: >>Page1.php - this page has my original post form >>Page2.php - this page does one thing with the post data >>Page3.php - this page shows the results of everything I have done >> >>But when I try to add the second transfer the data is lost: >>Page1.php - this page has my original post form >>Page2.php - this page does one thing with the post data >>Page3.php - this page does another thing with the post data >>Page4.php - Only the results from Page2.php are shown >> >>ASP does this with <%Server.Transfer ("transferpage1.asp")%> >>Is there a counterpart with PHP? >> >>- Matthew >> >> > >Martin Norland wrote: > > >>>include() :P >>> >>> > > > >>>seriously though, Page1.php and Page4.php are the only two pages that >>>should exist, if any. Page2 and Page3 should pretty much guaranteed be >>> >>> > > > >>>turned into function calls or classes and called from Page4.php. You >>>don't need to separate logic and display in separate scripts that you >>>push everything at, just separate your logic out into function calls. >>> >>> > > >What Martin suggests makes a lot of sense. Can you say something about why >you have the site design the way that you do? > >David > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Transfering post data to a series of pages.
After looking at what I wanted to do I see no good reason I can't do most of what we needed with function calls. The others can be handled with plugging more data into my session array. Somehow I thought this was a poor way of coding (I don't know why). Thank you everyone for your advice! - Matthew -Original Message- From: Brad Webb [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 04, 2005 12:21 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] Transfering post data to a series of pages. You may also consider using sessions to store form data.. this allows for actual user interaction with the data, back/forward etc... as well as tracking and other stuff.. you really should only have "Page1.php", and use a logic object to parse the data from there.. IMHO, of course. :) [EMAIL PROTECTED] wrote: >Perry, Matthew (Fire Marshal's Office) wrote: > > >>Is there a way to transfer post data to a series of PHP pages? >> >>For example, lets say I have the following 4 pages: >>Page1.php - this page has my original post form >>Page2.php - this page does one thing with the post data >>Page3.php - this page does another thing with the post data >>Page4.php - this page shows the results of everything I have done >> >>Right now I am using the header: >> >>The problem is, the following works: >>Page1.php - this page has my original post form >>Page2.php - this page does one thing with the post data >>Page3.php - this page shows the results of everything I have done >> >>But when I try to add the second transfer the data is lost: >>Page1.php - this page has my original post form >>Page2.php - this page does one thing with the post data >>Page3.php - this page does another thing with the post data >>Page4.php - Only the results from Page2.php are shown >> >>ASP does this with <%Server.Transfer ("transferpage1.asp")%> >>Is there a counterpart with PHP? >> >>- Matthew >> >> > >Martin Norland wrote: > > >>>include() :P >>> >>> > > > >>>seriously though, Page1.php and Page4.php are the only two pages that >>>should exist, if any. Page2 and Page3 should pretty much guaranteed be >>> >>> > > > >>>turned into function calls or classes and called from Page4.php. You >>>don't need to separate logic and display in separate scripts that you >>>push everything at, just separate your logic out into function calls. >>> >>> > > >What Martin suggests makes a lot of sense. Can you say something about why >you have the site design the way that you do? > >David > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Transfering post data to a series of pages.
You may also consider using sessions to store form data.. this allows for actual user interaction with the data, back/forward etc... as well as tracking and other stuff.. you really should only have "Page1.php", and use a logic object to parse the data from there.. IMHO, of course. :) [EMAIL PROTECTED] wrote: Perry, Matthew (Fire Marshal's Office) wrote: Is there a way to transfer post data to a series of PHP pages? For example, lets say I have the following 4 pages: Page1.php - this page has my original post form Page2.php - this page does one thing with the post data Page3.php - this page does another thing with the post data Page4.php - this page shows the results of everything I have done Right now I am using the header: The problem is, the following works: Page1.php - this page has my original post form Page2.php - this page does one thing with the post data Page3.php - this page shows the results of everything I have done But when I try to add the second transfer the data is lost: Page1.php - this page has my original post form Page2.php - this page does one thing with the post data Page3.php - this page does another thing with the post data Page4.php - Only the results from Page2.php are shown ASP does this with <%Server.Transfer ("transferpage1.asp")%> Is there a counterpart with PHP? - Matthew Martin Norland wrote: include() :P seriously though, Page1.php and Page4.php are the only two pages that should exist, if any. Page2 and Page3 should pretty much guaranteed be turned into function calls or classes and called from Page4.php. You don't need to separate logic and display in separate scripts that you push everything at, just separate your logic out into function calls. What Martin suggests makes a lot of sense. Can you say something about why you have the site design the way that you do? David -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Transfering post data to a series of pages.
Perry, Matthew (Fire Marshal's Office) wrote: > Is there a way to transfer post data to a series of PHP pages? > > For example, lets say I have the following 4 pages: > Page1.php - this page has my original post form > Page2.php - this page does one thing with the post data > Page3.php - this page does another thing with the post data > Page4.php - this page shows the results of everything I have done > > Right now I am using the header: > > The problem is, the following works: > Page1.php - this page has my original post form > Page2.php - this page does one thing with the post data > Page3.php - this page shows the results of everything I have done > > But when I try to add the second transfer the data is lost: > Page1.php - this page has my original post form > Page2.php - this page does one thing with the post data > Page3.php - this page does another thing with the post data > Page4.php - Only the results from Page2.php are shown > > ASP does this with <%Server.Transfer ("transferpage1.asp")%> > Is there a counterpart with PHP? > > - Matthew Martin Norland wrote: >> include() :P >> seriously though, Page1.php and Page4.php are the only two pages that >> should exist, if any. Page2 and Page3 should pretty much guaranteed be >> turned into function calls or classes and called from Page4.php. You >> don't need to separate logic and display in separate scripts that you >> push everything at, just separate your logic out into function calls. What Martin suggests makes a lot of sense. Can you say something about why you have the site design the way that you do? David
RE: [PHP-DB] Transfering post data to a series of pages. .
I agree!! -Original Message- From: Martin Norland [mailto:[EMAIL PROTECTED] Sent: MiƩrcoles, 04 de Mayo de 2005 08:39 a.m. To: php-db@lists.php.net Subject: Re: [PHP-DB] Transfering post data to a series of pages. . Perry, Matthew (Fire Marshal's Office) wrote: > Is there a way to transfer post data to a series of PHP pages? > > For example, lets say I have the following 4 pages: > Page1.php - this page has my original post form > Page2.php - this page does one thing with the post data > Page3.php - this page does another thing with the post data > Page4.php - this page shows the results of everything I have done > > Right now I am using the header: > > The problem is, the following works: > Page1.php - this page has my original post form > Page2.php - this page does one thing with the post data > Page3.php - this page shows the results of everything I have done > > But when I try to add the second transfer the data is lost: > Page1.php - this page has my original post form > Page2.php - this page does one thing with the post data > Page3.php - this page does another thing with the post data > Page4.php - Only the results from Page2.php are shown > > ASP does this with <%Server.Transfer ("transferpage1.asp")%> > Is there a counterpart with PHP? > > - Matthew include() :P seriously though, Page1.php and Page4.php are the only two pages that should exist, if any. Page2 and Page3 should pretty much guaranteed be turned into function calls or classes and called from Page4.php. You don't need to separate logic and display in separate scripts that you push everything at, just separate your logic out into function calls. cheers, -- - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Transfering post data to a series of pages. .. .
Martin Norland wrote: include() :P seriously though, Page1.php and Page4.php are the only two pages that should exist, if any. Page2 and Page3 should pretty much guaranteed be turned into function calls or classes and called from Page4.php. You don't need to separate logic and display in separate scripts that you push everything at, just separate your logic out into function calls. haha - clarification on the "if any"... I meant if there should even be a separate page for receiving the POST data. It will depend on how you have things setup, as to whether or not Page1 should POST to Page4 or just POST back onto itself. For e.g. 'detail' pages I tend to have POST to themselves, so you add an item in the page then it enters edit mode. Similarly with list pages, when modifying properties of a listed entity - e.g. "activate", "delete", "share". It all depends on how you want things, but you will want at least 1 .php script, as opposed to "if any" :) cheers, -- - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Transfering post data to a series of pages. .
Perry, Matthew (Fire Marshal's Office) wrote: Is there a way to transfer post data to a series of PHP pages? For example, lets say I have the following 4 pages: Page1.php - this page has my original post form Page2.php - this page does one thing with the post data Page3.php - this page does another thing with the post data Page4.php - this page shows the results of everything I have done Right now I am using the header: The problem is, the following works: Page1.php - this page has my original post form Page2.php - this page does one thing with the post data Page3.php - this page shows the results of everything I have done But when I try to add the second transfer the data is lost: Page1.php - this page has my original post form Page2.php - this page does one thing with the post data Page3.php - this page does another thing with the post data Page4.php - Only the results from Page2.php are shown ASP does this with <%Server.Transfer ("transferpage1.asp")%> Is there a counterpart with PHP? - Matthew include() :P seriously though, Page1.php and Page4.php are the only two pages that should exist, if any. Page2 and Page3 should pretty much guaranteed be turned into function calls or classes and called from Page4.php. You don't need to separate logic and display in separate scripts that you push everything at, just separate your logic out into function calls. cheers, -- - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php