0810
08-23-2002, 02:33 AM
Hi all
Thank you for helping me all the time.
I fixed like this
my php editor says "Parse error: parse error, unexpected '{' in c:\itohideo\unko.php on line 15"
I can't find my mistake. Please help thanks
Here is code
<?php
$PHP_AUTH_USER=$_POST["PHP_AUTH_USER"];
$PHP_AUTH_PW=$_POST["PHP_AUTH_PW"];
if(!isset($PHP_AUTH_USER))
{
Header("WWW-Authenticate: Basic realm=\"My Sample Site\"");
Header("HTTP/1.0 401 Authorized Request");
$errormode=$_POST["errormode"];
$errormode = "Cancel";
}
else($PHP_AUTH_USER != "itohideo" || $PHP_AUTH_PW != "1234" )
{
$errormode=$_POST["errrormode"];
$errormode = "Error";
}
?>
<html>
<head>
</head>
<body>
<?php
if($errrormode == "Cancel")
{
print("Conformation is Canceled<br>\n");
exit;
}
elseif($errormode == "Error")
{
print("Wrong username and password");
exit;
}
?>
</body>
</html>
Thank you for helping me all the time.
I fixed like this
my php editor says "Parse error: parse error, unexpected '{' in c:\itohideo\unko.php on line 15"
I can't find my mistake. Please help thanks
Here is code
<?php
$PHP_AUTH_USER=$_POST["PHP_AUTH_USER"];
$PHP_AUTH_PW=$_POST["PHP_AUTH_PW"];
if(!isset($PHP_AUTH_USER))
{
Header("WWW-Authenticate: Basic realm=\"My Sample Site\"");
Header("HTTP/1.0 401 Authorized Request");
$errormode=$_POST["errormode"];
$errormode = "Cancel";
}
else($PHP_AUTH_USER != "itohideo" || $PHP_AUTH_PW != "1234" )
{
$errormode=$_POST["errrormode"];
$errormode = "Error";
}
?>
<html>
<head>
</head>
<body>
<?php
if($errrormode == "Cancel")
{
print("Conformation is Canceled<br>\n");
exit;
}
elseif($errormode == "Error")
{
print("Wrong username and password");
exit;
}
?>
</body>
</html>