X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id A9FCAD1B894 for ; Fri, 9 Apr 2004 02:40:38 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 62269-06 for ; Fri, 9 Apr 2004 02:40:36 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 0CC61D1D1B8 for ; Fri, 9 Apr 2004 02:40:37 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i395eaSx093596 for ; Fri, 9 Apr 2004 05:40:36 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i395ZhXi092986 for pgsql-php@postgresql.org; Fri, 9 Apr 2004 05:35:43 GMT From: Tin X-Newsgroups: comp.databases.postgresql.interfaces.php Subject: Re: session_is_started() Date: Fri, 09 Apr 2004 07:35:43 +0200 Organization: Hub.Org Networking Services Lines: 15 Message-ID: References: <20040408134031.GA13236@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@news.hub.org User-Agent: KNode/0.7.6 To: pgsql-php@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/18 X-Sequence-Number: 2675 Joolz wrote: > I would like something like > > if (!session_is_started()) { // note: this function doesn't > exist > session_start(); > } Hi, this is not really a postgres-related question, but what the heck. Use session_id to detect if a session is started or not. See: http://hr2.php.net/manual/en/function.session-id.php for an example (user-contributed, at the bottom of the page).