Small Include Problem
| From: | Tom Peck | Date: | Thu, 27 Jul 2000 00:27:11 +0000 |
| Subject: | Small Include Problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-8448@lists.php.net to get a copy of this message | ||
Hello Everyone.
I have a small problem with using an include file. I have some code like
this:
<?
include("login.php3");
if(@mysql_connect("localhost", "root")) {
$db = mysql_connect("localhost", "root");
mysql_select_db("olympic",$db);
}
else {
$errMsg = "There has been a problem opening the database!";
require("../error.php");
exit();
}
?>
The problem is that the value for $errMsg doesn't get passed to the
'require'd file. Is this normal? If it is not done in this way, how else
is it possible? Using cookies?
Thanks
Tom Peck