Re: [PHP] Using 'Location' and variables

2002-02-21 Thread Krzysztof Dziekiewicz
On Thu, 21 Feb 2002, Jim Koutoumis wrote: > I'm sure that this is possible, but I haven't found any info/examples on it > yet,.. > > What I have is a php script that processes data that been submitted by a > FORM. You can make this using javascript. You generate HTML with hidden fields and at

Re: [PHP] Using 'Location' and variables

2002-02-20 Thread John Steele
Hi Jim, Glad that it makes sense now. In fact, the other page may not even need to exist. Instead of including a seperate page, you could simply display the output from within this same form script. I find this extremely useful in combination with a templating system. Happy coding, Joh

Re: [PHP] Using 'Location' and variables

2002-02-20 Thread Jim Koutoumis
John, I never even thought of just including the page I was wanting to redirect/switch to. I was always ending my processing portion with a header("Location : ") thingy in all of my scripts. As no output comes out during the processing stage it should all work. It seems so straight forward n

Re: [PHP] Using 'Location' and variables

2002-02-20 Thread John Steele
Hi Jim, The header() function call you use below IS doing a GET. Maybe if you told us why you need to redirect to this new page might help. Simply doing the processing then including the new page should work fine, as long as the processing part doesn't do any output. A simple example: if

Re: [PHP] Using 'Location' and variables

2002-02-20 Thread Jim Koutoumis
Thanks for your reply John. In fact I'm using the method you describe where the same script is used to both display and process the form. However, in the area where I'm doing the processing, I want to redirect at the end of it and still be able to use some of the variables in the location I'm go

Re: [PHP] Using 'Location' and variables

2002-02-20 Thread John Steele
Hi Jim, There are several ways to accomplish this such as flat files, database records, sessions, and the like. But I prefer to simply include a file (or have the one file do both form display and processing) and then you get all your variables: if ($REQUEST_METHOD == 'POST') { // either