Ich wollte mir für mienn Chat ein Passwort ausdenken, hatte ohne Passwort folgende Startdatei:
Nun habe ich versucht das ganze mit Formular und dem Passwort "beispiel" zu probieren!:
Doch der Server/Browser sagte mir immer er sehe einen Fehler:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../chat.php on line 7
Könnt ihr mir helfen???
HTML:
<html>
<frameset rows="2*,*">
<frame src="chat_aus.php" name="ausgabe">
<frame src="chat_ein.php" name="eingabe">
</frameset>
</html>
PHP:
<html>
<head>
<title> Willkommen im Chat! </title>
</head>
<body>
<?php
echo " <input type="password" name="pw"> " ;
echo "<input type="submit">";
$passwort = beispiel ;
if ($pw == "$passwort")
{
echo "<frameset rows="2*,*">";
echo " <frame src="chat_aus.php" name="ausgabe">";
echo " <frame src="chat_ein.php" name="eingabe">";
echo "</frameset> ";
echo " < script type="text/javascript">";
echo " alert('Zugang gestattet!')";
echo " </script>";
}
else
{
echo "<script type="text/javascript">";
echo "alert('ZUGANG VERWEIGERT !')";
echo "</script>";
}
?>
</body>
</html>
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../chat.php on line 7
Könnt ihr mir helfen???
Zuletzt bearbeitet: