Re: Session Variables
| From: | Harpreet | Date: | Thu, 24 Apr 2003 19:53:15 +0000 |
| Subject: | Re: Session Variables | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19594@lists.php.net to get a copy of this message | ||
I tried using mssql_pconnect
When i use the $connection session variable in the
mssql_select_db('database', $connection) on the second page it says
Notice: Undefined variable: connection in e:\INetPub\WWWRoot\traffic.inc on
line 1
How can I get the sessions to work in all the pages.
Please help
----- Original Message -----
From: "AP Fritts" <php@apwebd.com>
To: "Harpreet" <harpreet@crispincorp.com>
Sent: Thursday, April 24, 2003 3:39 PM
Subject: Re: [PHP-WIN] Session Variables
> you can't store database connections as far as i know, but you can open a
permenant one, mysql_pconnect(server,username,password) that will stay open
forever. Any script that needs that connection to the server will have it.
>
> ---------- Original Message ----------------------------------
> From: "Harpreet" <harpreet@crispincorp.com>
> Date: Thu, 24 Apr 2003 14:08:30 -0400
>
> >I can connect to sql server database using mssql_connect. I am trying to
use
> >the same connection saved as a session variable to be used again on the
> >second page. But i get an error saying connection to database not open.
> >
> >It seems like i cant use the session variables on the next page and have
to
> >redefine it on each page or hard code the connection on each page.
> >
> >Please help I am stuck on this issue.
> >
> >Thanks,
> >
> >Regards,
> >Harpreet
> >
> >
> >--
> >PHP Windows Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >