Hi,
I am having trouble getting a simple login/redirect script (without the use of a database) to work. When I click on the 'go' button, I get this error:
"Warning: fopen("www.rotaryairlock.com/index.html", "r") - No such file or directory in /data/httpd/vhosts/somewhere.com/httpdocs/names.php on line 13
Couldn't open page"
I am just now getting my feet wet with PHP. Can you take a quick look and see if I wrote the code wrong or point me in the right direction to make it work correctly.
Thank you for your time,
impressionist
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<?
if (($_POST[$username] == someone) && ($POST_[$password] == something)) //USER 1 (set Password and Username here)
{
$fp = fopen( "http://www.somewhere.com/index.html/", "r" ) or die ("Couldn't open page") ;
} else {
echo "<br><br>";
echo "<p align=center>" ;
echo "<b>Authentication Failed<br><br>Please hit your
'Back' button and try again.</b>" ;
echo "</p>" ;
}
?>
</BODY>
</HTML>