|
Posted by Jerry Stuckle on 08/05/06 02:49
Steve Poe wrote:
> Jerry (and felllow PHP gang),
>
> Well, I still could not get sessions to work past a submitted form, but
> I had a breakthrough. Using the hidden input fields like:
> '<input type="hidden" name="client_account" value="<? echo
> str_pad($_POST["account_number"], 6, " ", STR_PAD_LEFT)?>">' I was
> able to see the variable with the value in it.
>
> Until I figure out why sessions do not work, I can at least add hidden
> input fields to transfer needed values.
>
> Thanks.
>
> Steve
>
>
> Steve Poe wrote:
>
>>I must more clueless than I thought. I added 'session_start();' to the
>>begining of each PHP I am using and I still do not see the client
>>account after I submit it. I see it in the _SESSION *before* I hit
>>submit.
>>
>>Steve
>>
>>
>>>It needs to be on EVERY PAGE which uses sessions. Otherwise the
>>>$_SESSION array will not be usable on that page. You can save data to
>>>$_SESSION, but it won't be saved in the session.
>
>
Steve,
Ensure all of your errors are enabled (E_ALL) and you're displaying the
errors.
Chances are you're sending something to the client (even a single white
space character) before calling session-start().
session_start() MUST be called before ANY output is sent to the client.
Enabling all errors will display a warning to that effect if you are
doing it.
And your sessions won't work.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|