On Friday 04 January 2002 14:26, Bjarte HusebÝ wrote:
> 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);
> ?>

Yes, but then we come across the other problem, namely, if you click a 
submit button that has a ACTION="<?php echo $PHP_SELF?>", technically the 
script ends when it reloads the page, and therefore also forgets $host, 
$username and $password, so I'd probably still have to somehow register the
variables, ie. using session_register, no?

Markus Lervik
Linux-administrator with a kungfoo grip
Vaasa City Library - Regional Library
+358-6-325 3589 / +358-40-832 6709

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to