Reply to Re: how to make a database connection available to all pages?
Posted by Oli Filth on 06/26/05 20:57
ndsoumah@gmail.com said the following on 26/06/2005 18:23:
> hi all
>
> How can I make a database connection available to all the pages in my
> application?
> I tried doing it with session but it doesn't seem to work.
>
You cannot store resource variables in $_SESSION.
Just create a new connection on each page. You could put the connection
code in an include-file if you want.