Re: Sending variables between PHP pages

From: Date: Fri, 04 Jan 2002 12:29:03 +0000
Subject: Re: Sending variables between PHP pages
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-15380@lists.php.net to get a copy of this message
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 markus.lervik@vaasa.fi +358-6-325 3589 / +358-40-832 6709

« previous php.db (#15380) next »