Re: Header() don't work
| From: | Web user | Date: | Thu, 18 Oct 2001 15:07:38 +0000 |
| Subject: | Re: Header() don't work | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-71496@lists.php.net to get a copy of this message | ||
The original scripts of login.php have the line: require("lib.inc");, the
lib.inc is as below
<?
function connectdb(){
$handler=mysql_connect("localhost","","");
if($handler==false){
echo "Failed connecting to database.";
exit();
}
$handler=mysql_select_db("database");
if($handler==false){
echo "Failed connecting to database.";
exit();
}
return $handler;
}
?>
After I deleted the require() line, and use myslq_connect() and
mysql_select_db() in the login.php,
the header() does work. So I think there must be some output while running
at the line of "return $handler;"
Regards
Mike