Well, perhaps stepping away from the problem for a few minutes actually helps
clear the mind. Found that one of my mysql_query() statements wasn't completing
and everything after that didn't finish. Once I fixed that, all the session
variables work. Go fig. Let that be a lesson to me :-)
Greg Macek wrote:
> Forgive the long post here, but I'll give as much info up-front and see
> if anyone can help me out here...
>
> I've searched the PHP docs for some help, but I am still running into a
> strange problem. Let me explain: I'm working on an internal site that
> stores information into a database, but it can be retrieved at a later
> date. The data initially is entered over many pages ( ~10 forms), so
> I've used sessions to store that data across those pages so that if they
> decide to move out of order, their data is still there. Once they're
> done, they can save the data, etc... we've all heard this story.
>
> Now, on retrieval, I'm pulling all the information from the database and
> storing them in session variables, which all happen to be arrays. There
> is a lot of data to retrieved and put into variables. I have one PHP
> script perform all this and then re-direct the user to the start page.
> Unfortunately, the script isn't storing all the session variables, only
> the first 5 of 7 variable arrays.
>
>
> The page looks similar to this:
>
> <?php
> session_start();
> require "include_file.inc";
> mysql_pconnect(...);
> mysql_select_db(...);
>
> $result1 = mysql_fetch_object(mysql_query(...));
>
> $sess_var1[formVar1] = $result1->data_field;
> .
> session_register("sess_var1");
> ...// (and so on)
>
> // and then the re-direct
> Header("Location:next_page.php");
> ?>
>
> Unfortunately when I place the Header() call at the end of the file, it
> just sits there and doesn't re-direct. If I place it after
> session_start(), it will re-direct, but only the first five session
> variables are registered. Is there something I'm missing here or trying
> to do too much?
>
> - Greg
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php