Re: [PHP] Passing variables between pages

2008-09-23 Thread Thodoris
At 11:19 PM +0100 9/21/08, Nathan Rixham wrote: so may as well just have everything in one script then.. You always have the option to write one huge script for any application. But normally in programming, we confront any problem by breaking it down into smaller steps and writing code to

Re: [PHP] Passing variables between pages

2008-09-22 Thread tedd
At 8:39 PM +0100 9/21/08, Stut wrote: On 21 Sep 2008, at 18:13, Nathan Rixham wrote: at it's simplest is this correct..? index.php ?php $variables = $_POST; include 'anotherscript.php'; ? anotherscript.php ?php print_r( $variables ); //include has access to $variables from parent print_r(

Re: [PHP] Passing variables between pages

2008-09-22 Thread tedd
At 6:20 PM -0400 9/21/08, Robert Cummings wrote: Looks like a basic front-end loader pattern. Data isn't passed, it's available by virtue of being in the current request's context. Cheers, Rob. Rob: I don't know what a basic front-end loader pattern is, but the data is available to the next

Re: [PHP] Passing variables between pages

2008-09-22 Thread Nathan Rixham
tedd wrote: -Stut and Nathan: The problem was not how to pass variables between requests, but rather how to variables between pages -- as the subject line indicates. a! now I follow; and surely tedd what you say is indeed the best way of achieving this. cheers for taking

Re: [PHP] Passing variables between pages

2008-09-22 Thread tedd
At 11:19 PM +0100 9/21/08, Nathan Rixham wrote: so may as well just have everything in one script then.. You always have the option to write one huge script for any application. But normally in programming, we confront any problem by breaking it down into smaller steps and writing code to

Re: [PHP] Passing variables between pages

2008-09-22 Thread tedd
At 2:47 PM +0100 9/22/08, Nathan Rixham wrote: tedd wrote: -Stut and Nathan: The problem was not how to pass variables between requests, but rather how to variables between pages -- as the subject line indicates. a! now I follow; and surely tedd what you say is indeed the

Re: [PHP] Passing variables between pages

2008-09-22 Thread Eric Butera
On Mon, Sep 22, 2008 at 9:49 AM, tedd [EMAIL PROTECTED] wrote: At 11:19 PM +0100 9/21/08, Nathan Rixham wrote: so may as well just have everything in one script then.. You always have the option to write one huge script for any application. But normally in programming, we confront any

Re: [PHP] Passing variables between pages

2008-09-22 Thread Nathan Rixham
tedd wrote: At 2:47 PM +0100 9/22/08, Nathan Rixham wrote: tedd wrote: -Stut and Nathan: The problem was not how to pass variables between requests, but rather how to variables between pages -- as the subject line indicates. a! now I follow; and surely tedd what you say is

Re: [PHP] Passing variables between pages

2008-09-22 Thread Stut
On 22 Sep 2008, at 15:08, tedd wrote: At 2:47 PM +0100 9/22/08, Nathan Rixham wrote: tedd wrote: -Stut and Nathan: The problem was not how to pass variables between requests, but rather how to variables between pages -- as the subject line indicates. a! now I follow; and

Re: [PHP] Passing variables between pages

2008-09-22 Thread Jason Pruim
On Sep 22, 2008, at 10:41 AM, Nathan Rixham wrote: tedd wrote: At 2:47 PM +0100 9/22/08, Nathan Rixham wrote: tedd wrote: -Stut and Nathan: The problem was not how to pass variables between requests, but rather how to variables between pages -- as the subject line indicates.

Re: [PHP] Passing variables between pages

2008-09-22 Thread Micah Gersten
I would think debugging a chain of code is more of a nightmare than debugging a $_SESSION variable. Also, HTTP is a stateless protocol no matter what you do. If you want to pass data around, the only ways to do it are $_SESSIONS and cookies with $_SESSIONS being preferable as they stay on the

Re: [PHP] Passing variables between pages

2008-09-22 Thread Micah Gersten
You're not passing anything from the browser which is what the OP wanted. You're hard coding variables and the using them in other scripts. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com tedd wrote: I don't know what a basic front-end loader pattern is,

Re: [PHP] Passing variables between pages

2008-09-22 Thread Micah Gersten
Sessions are used to pass dynamic content between pages. Your method is passing static content. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com tedd wrote: No problem. But here is what I would like you to consider, the next time you are thinking about

Re: [PHP] Passing variables between pages

2008-09-22 Thread tedd
At 10:18 AM -0400 9/22/08, Eric Butera wrote: I don't understand what sort of point you're trying to make with this? The original poster asked how to keep state between different pages which in that context did mean separate requests. It seems like you're trying to be confusing on purpose.

Re: [PHP] Passing variables between pages

2008-09-21 Thread Nathan Rixham
tedd wrote: At 8:31 PM +0100 9/20/08, Nathan Rixham wrote: Am I missing something here..? Yes. You are missing the point. This is exactly the same; you don't need $_SESSION's in this case because all you're doing is POST'ing the data every time.. And that's what you are missing -- it's

Re: [PHP] Passing variables between pages

2008-09-21 Thread Stut
On 21 Sep 2008, at 18:13, Nathan Rixham wrote: tedd wrote: At 8:31 PM +0100 9/20/08, Nathan Rixham wrote: Am I missing something here..? Yes. You are missing the point. This is exactly the same; you don't need $_SESSION's in this case because all you're doing is POST'ing the data every

Re: [PHP] Passing variables between pages

2008-09-21 Thread Robert Cummings
On Sun, 2008-09-21 at 20:39 +0100, Stut wrote: On 21 Sep 2008, at 18:13, Nathan Rixham wrote: tedd wrote: At 8:31 PM +0100 9/20/08, Nathan Rixham wrote: Am I missing something here..? Yes. You are missing the point. This is exactly the same; you don't need $_SESSION's in this case

Re: [PHP] Passing variables between pages

2008-09-21 Thread Nathan Rixham
Robert Cummings wrote: On Sun, 2008-09-21 at 20:39 +0100, Stut wrote: On 21 Sep 2008, at 18:13, Nathan Rixham wrote: tedd wrote: At 8:31 PM +0100 9/20/08, Nathan Rixham wrote: Am I missing something here..? Yes. You are missing the point. This is exactly the same; you don't need $_SESSION's

Re: [PHP] Passing variables between pages

2008-09-20 Thread Nathan Rixham
tedd wrote: At 12:42 PM -0400 9/19/08, Dan Joseph wrote: On Fri, Sep 19, 2008 at 12:35 PM, tedd [EMAIL PROTECTED] wrote: At 12:22 PM -0400 9/19/08, Jason Pruim wrote: It's interesting that another topic (i.e. [PHP] SESSIONS vs. MySQL) is discussing the differences in storing variables in

Re: [PHP] Passing variables between pages

2008-09-20 Thread tedd
At 8:31 PM +0100 9/20/08, Nathan Rixham wrote: Am I missing something here..? Yes. You are missing the point. This is exactly the same; you don't need $_SESSION's in this case because all you're doing is POST'ing the data every time.. And that's what you are missing -- it's not continued

[PHP] Passing variables between pages

2008-09-19 Thread Jason Pruim
Hi everyone, Stupid question of the week... A array variable is not being passed between 2 pages. Are my options: #1. Use sessions? #2. Use cookies? #3. Use a hidden form to pass the variable's around? Here's some context... I am working on a timecard system where they are presented the

Re: [PHP] Passing variables between pages

2008-09-19 Thread Dan Joseph
On Fri, Sep 19, 2008 at 10:54 AM, Jason Pruim [EMAIL PROTECTED] wrote: Hi everyone, Stupid question of the week... A array variable is not being passed between 2 pages. Are my options: #1. Use sessions? #2. Use cookies? #3. Use a hidden form to pass the variable's around? Here's some

Re: [PHP] Passing variables between pages

2008-09-19 Thread Jason Pruim
On Sep 19, 2008, at 11:08 AM, Dan Joseph wrote: On Fri, Sep 19, 2008 at 10:54 AM, Jason Pruim [EMAIL PROTECTED] wrote: Hi everyone, Stupid question of the week... A array variable is not being passed between 2 pages. Are my options: #1. Use sessions? #2. Use cookies? #3. Use a hidden

Re: [PHP] Passing variables between pages

2008-09-19 Thread Wolf
!-- SNIP -- Main page, login, $_SESSION gets set. !-- SNIP -- What Dan says, Sessions is the way to go with anything where you have logins and need to do more stuff with the person. Easy to set up, easy to handle... Of course, if you want to do it without sessions, you could get the session

Re: [PHP] Passing variables between pages

2008-09-19 Thread Thodoris
Jason Pruim wrote: Hi everyone, Stupid question of the week... A array variable is not being passed between 2 pages. Are my options: #1. Use sessions? #2. Use cookies? #3. Use a hidden form to pass the variable's around? Here's some context... I am working on a timecard system where they

Re: [PHP] Passing variables between pages

2008-09-19 Thread tedd
At 11:15 AM -0400 9/19/08, Jason Pruim wrote: It makes perfect sense... Was just trying to avoid sessions since this application will be limited to about 10 people and restricted to the company intranet :) But the script is still stateless regardless of the number of people or if it's

Re: [PHP] Passing variables between pages

2008-09-19 Thread tedd
At 11:20 AM -0400 9/19/08, Wolf wrote: But why go around your elbow to blow your nose? Wolf Yeah, That's like pounding sand in a gopher hole -- a phrase (one of many) that my wife uses that I have yet to understand. Cheers, tedd -- --- http://sperling.com http://ancientstones.com

Re: [PHP] Passing variables between pages

2008-09-19 Thread Jason Pruim
On Sep 19, 2008, at 12:11 PM, tedd wrote: At 11:15 AM -0400 9/19/08, Jason Pruim wrote: It makes perfect sense... Was just trying to avoid sessions since this application will be limited to about 10 people and restricted to the company intranet :) But the script is still stateless

Re: [PHP] Passing variables between pages

2008-09-19 Thread tedd
At 12:22 PM -0400 9/19/08, Jason Pruim wrote: So if I'm understanding you right... You're suggesting that in my timecard app which has index.php (user login) and timecard.php (Actual time card app) I could simply load index.php and then on submit have it do this: ob_clean;

Re: [PHP] Passing variables between pages

2008-09-19 Thread Dan Joseph
On Fri, Sep 19, 2008 at 12:35 PM, tedd [EMAIL PROTECTED] wrote: At 12:22 PM -0400 9/19/08, Jason Pruim wrote: It's interesting that another topic (i.e. [PHP] SESSIONS vs. MySQL) is discussing the differences in storing variables in SESSIONS as compared to storing them in MySQL when using

Re: [PHP] Passing variables between pages

2008-09-19 Thread tedd
At 12:42 PM -0400 9/19/08, Dan Joseph wrote: On Fri, Sep 19, 2008 at 12:35 PM, tedd [EMAIL PROTECTED] wrote: At 12:22 PM -0400 9/19/08, Jason Pruim wrote: It's interesting that another topic (i.e. [PHP] SESSIONS vs. MySQL) is discussing the differences in storing variables in SESSIONS as

[PHP] passing variables between pages without sessions

2005-03-13 Thread Ross Hulford
I am creating a form but instead of having a long form I want to break it down into a few stages but need to pass the variables bewteen the pages. I have done this before using sessions but would like to know if there is an alternative way to do this? R. -- PHP General Mailing List

RE: [PHP] passing variables between pages without sessions

2005-03-13 Thread Robbert van Andel
Subject: [PHP] passing variables between pages without sessions I am creating a form but instead of having a long form I want to break it down into a few stages but need to pass the variables bewteen the pages. I have done this before using sessions but would like to know

RE: [PHP] passing variables between pages without sessions

2005-03-13 Thread R. Van Tassel
: [PHP] passing variables between pages without sessions I am creating a form but instead of having a long form I want to break it down into a few stages but need to pass the variables bewteen the pages. I have done this before using sessions but would like to know if there is an alternative way

[PHP] Passing variables between pages

2003-10-14 Thread KB
Hi, Simple one for anyone who wants to help out a novice. How do you pass a variable from one page to another? Urgent help would be appreciated. With thanks Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Passing variables between pages

2003-10-14 Thread Jay Blanchard
[snip] Simple one for anyone who wants to help out a novice. How do you pass a variable from one page to another? [/snip] Through either a $_POST or a $_GET variable array. onepage.php form action=another.php method=POST input type=text name=myvariable input type=submit /form another.php

Re: [PHP] Passing variables between pages

2003-10-14 Thread Eugene Lee
On Tue, Oct 14, 2003 at 10:20:44AM -0500, Jay Blanchard wrote: : KB [EMAIL PROTECTED] asked: : : Simple one for anyone who wants to help out a novice. How do you : pass a variable from one page to another? : : Through either a $_POST or a $_GET variable array. And cookies and sessions and

RE: [PHP] Passing variables between pages

2003-10-14 Thread Jay Blanchard
[snip] : Simple one for anyone who wants to help out a novice. How do you : pass a variable from one page to another? : : Through either a $_POST or a $_GET variable array. And cookies and sessions and database backends oh my! [/snip] Aww Genethat is for intermediates, not novi! --

[PHP] Passing variables between pages

2003-10-13 Thread Rashini Jayasinghe
Hi, I want to pass a variable between three pages. I tried to get a username from the first page through a form. Use that username in a select statement in the second page to query a table.Everything is fine up to that point. now I want to pass the same username to the third page where I have

Re: [PHP] Passing variables between pages

2003-10-13 Thread Raditha Dissanayake
Hi, You need to use sessions. Please refer session handling functions in the manual. Having said that it's a bad idea to put username in a session. You need to have some kind of association between session ids and username's in app. The most common way this is done is with a two column table.

Re: [PHP] Passing variables between pages

2003-10-13 Thread John Nichel
Rashini Jayasinghe wrote: Hi, I want to pass a variable between three pages. I tried to get a username from the first page through a form. Use that username in a select statement in the second page to query a table.Everything is fine up to that point. now I want to pass the same username to the

[PHP] passing variables between pages without using url??

2001-11-03 Thread sunny AT wde
hi php'ers! just a quick question please, it would help me out a lot. i've written a form, which passes value to a ph script to insert them into mysql. from there on, i forward onto another page, but using : header(Location: http://www.foo.com/foo2.php?id=4user=foo;); now i really don't want

Re: [PHP] passing variables between pages without using url??

2001-11-03 Thread Steve Werby
sunny AT wde [EMAIL PROTECTED] wrote: i've written a form, which passes value to a ph script to insert them into mysql. from there on, i forward onto another page, but using : header(Location: http://www.foo.com/foo2.php?id=4user=foo;); now i really don't want to have the url on the next

Re: [PHP] passing variables between pages without using url??

2001-11-03 Thread sunny AT wde
Ok, but how do I use post when using Header?? I would like to have a form, but I don't know how I would make the script automatcially re-direct in a form... becase I know how to use form variables that way. But all I can think of is using header, yet that displays the variables as its like get