Reply to Re: Conditional session, only start session for certain users.

Your name:

Reply:


Posted by Rik on 11/27/05 14:56

Oli Filth wrote:
> At the top of a script, something like:
>
> <?php
> if (isset($_COOKIE['PHPSESSID']))
> {
> session_start();
> // other session-related stuff here
> }

> NOTE: I haven't tried this, so there's no guarantee that it will work.
>
>> 2. Inlogform is submitted.
> <?php
> // perform log-in validation here
>
> if (Log-in is valid)
> {
> session_start();
> }

Thanks, I'll ty this


>> How can i prevent the ugly PHPSESSID=blabla in the url when the
>> browser won't accept cookies?
>
> You can do is disable URL-based session IDs, by setting
> session.use_only_cookies = 1 in your ini file.

Unfortunately I cannot change the ini file, but I've found the resolution:
output_reset_rewrite_vars();
"This function resets the URL rewriter and undo the changes made by
output_add_rewrite_var() and/or by session_start() that are still in the
buffer."

Grtz,

Rik

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация