On Fri, Apr 11, 2008 at 6:30 AM, tedd <[EMAIL PROTECTED]> wrote:

> Isn't that what the code is doing?
>
> I'm dumping the results in a print_r($_SESSION) -- isn't that he same
> thing?


sorry tedd; obviously i was hasty to post.  but i figured just looking for
the obvious would be a good exercise as i cant count the times ive launched
into an exhaustive search for the problem when its really something silly
ive overlooked.  that said; i know ur smart and you always post hard
problems for 'the gang' ;)
anyway, taking the cue from some of the other responses, have you looked at
the page on session_write_close() ?
http://us2.php.net/manual/en/function.session-write-close.php
its kind of interesting; it looks like lots of people have run into issues
using the location header to redirect clients to another script after a form
submission.  its never happened to me (knock on wood) but anyway some of the
posts on that page may be worth reading.
also, though it wont answer your question about why its happening, i was
thinking you might alter the flow of ur scripts to see if you can get the
same behavior on both sites.  heres what i was thinking:
add a hidden input to the form (from index.php)

<input type="hidden" name="formsubmission" value="1" />

then after you call session_start() in index.php, have the following

if(isset($_POST['formsubmission']) && $_POST['formsubmission'] == '1')) {
    include('part2.php');  // process form submission
}

then, make the following adjustments to part2.php

remove the call to session_start()
remove the call to header(location ...
remove the call to exit()

i think this will have the effect that the work flow is unaltered, but the
organization of the logic on the back end will be different.  effectively
the call to header(location... will be removed so we would be able to tell
if the issue is related to that.

-nathan

Reply via email to