It often see problems with sessions in PHP. Here is an example of error:
PHP Code:
<? php
if (isset ($ _SESSION [ 'test']))
(
/ / action
)
>
Troubleshooting:
Here we see that the direction session_start (); was forgotten. We must therefore add:
PHP Code:
<? php
session_start ();
if (isset ($ _SESSION [ 'test']))
(
/ / action
)
>
Once this is done, it is possible that the problem persists. How in this case?
- Make sure you do not send HTML (between PHP tags or not) before session_start (); an echo''as HTML output is the same thing).
- Make sure you do wrong in the name of your variable, $ _SESSION and $ _SESSION are two different tables (only one being correct in our use).
- Check for certain hosts that you have created a directory suitable for the sessions (eg at Free must create a session at the root of your FTP account.
Bookmarks