Ok, I've got a problem.....
I have a login and password screen. When I try to include a Htm file in my php the server can't read the file. It works fine on my localhost, but when I upload it to the server I get problems. I think that I will have to use "include_path" somehow, but I can't figure out how. You can see the script in question and the errormessage below. Locally I use PHP 4.0.4pl1
<?php
$username=$HTTP_POST_VARS['username'];
$password=$HTTP_POST_VARS['password'];
$adminusername="Bob";
$adminpassword="1";
echo "$username<br>";
echo "$password<br>";
echo"hello";
$username=strtolower($username);
// check the username and quit if it doesn't match
if ($username !=$adminusername || $password !=$adminpassword) {
print "Username or password not valid.....Try again!!";
exit;
} else {
include("admin.htm");
exit;
}
?>
The errormessage I get is as follows:
Warning: main(admin.htm): failed to open stream: No such file or directory in /customers/hanspetur.net/hanspetur.net/httpd.www/Admin_login.php on line 21
Warning: main(): Failed opening 'admin.htm' for inclusion (include_path='.:') in /customers/hanspetur.net/hanspetur.net/httpd.www/Admin_login.php on line 21
Any clue?