RE: [PHP-DB] Sending variables between PHP pages

From: Date: Fri, 04 Jan 2002 12:26:38 +0000
Subject: RE: [PHP-DB] Sending variables between PHP pages
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-15379@lists.php.net to get a copy of this message
Another way of doing this, is including a file at the beginning of each script: Example: <?php # Include the file containing general variables/constants/funstions require ("general.inc"); # Open a connection to MySQL using variables from general.inc $link = mysql_connect ($host, $username, $password); ?> Regards, -Bjarte- > -----Original Message----- > From: markus|lervik [mailto:markus.lervik@vaasa.fi] > Sent: Friday, January 04, 2002 12:40 PM > To: Berlina > Cc: php-db@lists.php.net > Subject: Re: [PHP-DB] Sending variables between PHP pages > > > On Friday 04 January 2002 13:15, you wrote: > > Hi users, > > > > how can I send a connection database variable, from one PHP > page to other > > PHP page, and maintance the database connection open during both pages? > > > > Thanks > > This is exactly what I've been fighting with for quite some time. > Actually, what I did was, session_register username and password and > the required variables and reconnect to the db when needed. Not quite the > most elegant way of solving the problem, but it works... > If anyone has got a better way of doing it, I'd be more than happy to hear > about it. > > Cheers, > Markus > > -- > Markus Lervik > Linux-administrator with a kungfoo grip > Vaasa City Library - Regional Library > markus.lervik@vaasa.fi > +358-6-325 3589 / +358-40-832 6709 > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#15379) next »