G
Gast
Gast
Hallo,
ich bekomme folgenden fehler wisst ihr woran das liegen könnte
Ich weiß das ist nicht das richtige Forum dafür aber auf php-board und webmastermind antwortet keiner
lg Fridolin
Parse error: syntax error, unexpected \\\'<\\\' in c:\\\\Inetpub\\\\wwwroot\\\\form1.php on line 24
form1.php
<html>
<head>
<title>4HIA</title>
</head>
<body bgcolor =\\\"#663333\\\" text =\\\"#FFCC99\\\" link =\\\"FF9966\\\" vlink =\\\"FF9900\\\" alink =\\\"FFFFFF\\\">
<hr noshade =\\\"noshade\\\" width =\\\"600\\\" size =\\\"3\\\" align =\\\"center\\\">
<hr noshade =\\\"noshade\\\" width= \\\"600\\\" size= \\\"3\\\" align =\\\"center\\\">
<center>
<font face =\\\"Castellar\\\" color =\\\"#FFCC88\\\" size =\\\"-1\\\">MAIN PAGE</font>
</center>
<?php
if($_POST[\\\"hallo\\\"] == \\\'login\\\')
{
$file = fopen(\\\"sessions.txt\\\", \\\"r\\\");
if($file)
{
$userinsession = array();
$login = 0;
while(!feof($file) )
{
$userexists = array();
$line = fgets($file, 60);
$userexists = explode(\\\"|\\\",$line);
array_push($userinsession, $userexists[0]);
if($userexists[0] == $_POST[\\\'benutzer\\\'] && trim($userexists[1]) == $_POST[\\\'passwort\\\'])
{
echo \\\"Willkommen $userexists[0]\\\";
$_SESSION[\\\'nutzer\\\'] = $userexists[0];
$_SESSION[\\\'kennung\\\'] = $userexists[1];
echo \\\"<font face =\\\"Castellar\\\" color =\\\"#FFCC22\\\" size =\\\"-1\\\"><a href =\\\"frames1.htm\\\" align =\\\"center\\\" alt =>WELCOME TO MY MAIN PAGE</a></font>
\\\"
$login = 1;
//break;
}
}
if(!$login)
{
echo \\\"<center>Falsches Passwort oder Benutzer </center>\\\";
<center>
echo \\\"<font face =\\\"Castellar\\\" color =\\\"#FFCC22\\\" size =\\\"-1\\\"><a href =\\\"form1.htm\\\" align =\\\"center\\\" alt =>Zurück zum Login</a></font></center>
\\\";
}
}
fclose($file);
}
?>
</body>
</html>
form1.htm
<html>
<head>
<title>4HIA</title>
</head>
<body bgcolor =\\\"#663333\\\" text =\\\"#FFCC99\\\" link =\\\"FF9966\\\" vlink =\\\"FF9900\\\" alink =\\\"FFFFFF\\\">
<hr noshade =\\\"noshade\\\" width =\\\"600\\\" size =\\\"3\\\" align =\\\"center\\\">
<form action = \\\"form1.php\\\" method =\\\"post\\\">
<input type =\\\"hidden\\\" name =\\\"hallo\\\" value =\\\"login\\\">
<p align =\\\"center\\\">
Benutzer
<input name =\\\"benutzer\\\" type =\\\"text\\\" size =\\\"30\\\" maxlength =\\\"20\\\">
</p>
<p align =\\\"center\\\">
Passwort
<input name =\\\"passwort\\\" type =\\\"text\\\" size =\\\"30\\\" maxlength =\\\"20\\\">
</p>
<table border align =\\\"center\\\">
<tr>
<td><input type =\\\"submit\\\" name =\\\"send\\\" value =\\\"senden\\\"></td>
</tr>
</table>
</form>
<hr noshade =\\\"noshade\\\" width= \\\"600\\\" size= \\\"3\\\" align =\\\"center\\\">
<center>
<font face =\\\"Castellar\\\" color =\\\"#FFCC88\\\" size =\\\"-1\\\">LOGIN</font>
</center>
</body>
</html>
ich bekomme folgenden fehler wisst ihr woran das liegen könnte
Ich weiß das ist nicht das richtige Forum dafür aber auf php-board und webmastermind antwortet keiner
lg Fridolin
Parse error: syntax error, unexpected \\\'<\\\' in c:\\\\Inetpub\\\\wwwroot\\\\form1.php on line 24
form1.php
<html>
<head>
<title>4HIA</title>
</head>
<body bgcolor =\\\"#663333\\\" text =\\\"#FFCC99\\\" link =\\\"FF9966\\\" vlink =\\\"FF9900\\\" alink =\\\"FFFFFF\\\">
<hr noshade =\\\"noshade\\\" width =\\\"600\\\" size =\\\"3\\\" align =\\\"center\\\">
<hr noshade =\\\"noshade\\\" width= \\\"600\\\" size= \\\"3\\\" align =\\\"center\\\">
<center>
<font face =\\\"Castellar\\\" color =\\\"#FFCC88\\\" size =\\\"-1\\\">MAIN PAGE</font>
</center>
<?php
if($_POST[\\\"hallo\\\"] == \\\'login\\\')
{
$file = fopen(\\\"sessions.txt\\\", \\\"r\\\");
if($file)
{
$userinsession = array();
$login = 0;
while(!feof($file) )
{
$userexists = array();
$line = fgets($file, 60);
$userexists = explode(\\\"|\\\",$line);
array_push($userinsession, $userexists[0]);
if($userexists[0] == $_POST[\\\'benutzer\\\'] && trim($userexists[1]) == $_POST[\\\'passwort\\\'])
{
echo \\\"Willkommen $userexists[0]\\\";
$_SESSION[\\\'nutzer\\\'] = $userexists[0];
$_SESSION[\\\'kennung\\\'] = $userexists[1];
echo \\\"<font face =\\\"Castellar\\\" color =\\\"#FFCC22\\\" size =\\\"-1\\\"><a href =\\\"frames1.htm\\\" align =\\\"center\\\" alt =>WELCOME TO MY MAIN PAGE</a></font>
\\\"
$login = 1;
//break;
}
}
if(!$login)
{
echo \\\"<center>Falsches Passwort oder Benutzer </center>\\\";
<center>
echo \\\"<font face =\\\"Castellar\\\" color =\\\"#FFCC22\\\" size =\\\"-1\\\"><a href =\\\"form1.htm\\\" align =\\\"center\\\" alt =>Zurück zum Login</a></font></center>
\\\";
}
}
fclose($file);
}
?>
</body>
</html>
form1.htm
<html>
<head>
<title>4HIA</title>
</head>
<body bgcolor =\\\"#663333\\\" text =\\\"#FFCC99\\\" link =\\\"FF9966\\\" vlink =\\\"FF9900\\\" alink =\\\"FFFFFF\\\">
<hr noshade =\\\"noshade\\\" width =\\\"600\\\" size =\\\"3\\\" align =\\\"center\\\">
<form action = \\\"form1.php\\\" method =\\\"post\\\">
<input type =\\\"hidden\\\" name =\\\"hallo\\\" value =\\\"login\\\">
<p align =\\\"center\\\">
Benutzer
<input name =\\\"benutzer\\\" type =\\\"text\\\" size =\\\"30\\\" maxlength =\\\"20\\\">
</p>
<p align =\\\"center\\\">
Passwort
<input name =\\\"passwort\\\" type =\\\"text\\\" size =\\\"30\\\" maxlength =\\\"20\\\">
</p>
<table border align =\\\"center\\\">
<tr>
<td><input type =\\\"submit\\\" name =\\\"send\\\" value =\\\"senden\\\"></td>
</tr>
</table>
</form>
<hr noshade =\\\"noshade\\\" width= \\\"600\\\" size= \\\"3\\\" align =\\\"center\\\">
<center>
<font face =\\\"Castellar\\\" color =\\\"#FFCC88\\\" size =\\\"-1\\\">LOGIN</font>
</center>
</body>
</html>