Persistent connection & many scripts ?
| From: | Picard, Cyril | Date: | Tue, 17 Apr 2001 13:46:13 +0000 |
| Subject: | Persistent connection & many scripts ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-48961@lists.php.net to get a copy of this message | ||
Hi all
I use PHP to query a PostgreSQL database.
Today I know how to query the database with a PHP script, but I have to
establish a connection to the database in each script.
Is there a way to get the following :
connect.php : a script where the user enters its login and password, and
connect to the DB by the submit button (submit button which action url is
query.php).
query.php : a script that performs a query using the connection from
connect.php
I know that I could send the login/password to the query.php to establish
the connection ; but it is not what I would like (sometimes - often - the
connection time is bigger than the query time itself !)
Thanks for your help !