l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
December 2: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2003 Feb 04 22:59

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Question about php settings and passing form data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Question about php settings and passing form data



On Tue, Feb 04, 2003 at 06:06:49PM -0800, ME wrote:
> Hello,
> 
> I want to use a php redirector
> header('Location: http://website.nofun/redirect.....)
> and I want to pass to the page ref-ed in the URI a number of FORM variables.
> 
> However, I am meeting with little luck on this.
> 
> If I encode the variables as part of the URL with "&" as a separator, I
> dcan get the form data and variables that store them (names) to pass
> through to the page.

Clarifying, you *can* get the above to work as it should?

> However, use of
> $_SESSION["var_name"] = "var value";
> Does not pass the variable or data, and use of
> session_register('variable_name');
> is also proving fruitless. (I only used one or the other (_SESSION vs
> session_register()) not both.)
> 
> I expect this should work, but cannot find mention of setting for
> controlling this. (I even tried avoiding the appearance int he URL by
> encoding a \r\nvarname:%20var%20value\r\n to fool the client into passing
> the URL with header data separate. No go.
> 
> Suggestions on what config settings should be examined within php to
> ensure that form data can be passed as it should, in the HTTP header with
> PHP 4.3.0?

Session data in PHP is not passed as part of the HTTP request.  By
default sessions are stored in whatever container your session handler
provides (like a database, for example).  The default session handler
stores the session as a flat file in /tmp, unless you're smart/paranoid
and have changed the value for session.save_path.  What *is* passed is
the session id, via either GET, POST or cookies.

To see if the sessid is geting passed through your redirect, try:
echo session_id();
Make sure it's the same on the page before the redirect and on the page
after.

Also, the php function phpinfo() can be useful for debugging.

Did I understand your problem correctly?  If not, please clarify.

-troy

_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!