ユーザーのログインに役立つセッションの概念を学んでいます。次のphpコードを実行しましたが、次のエラーが発生します。解析エラー:構文エラー、予期しないT_STRING、予期しない'、'、または ' ; ' 12行目のC:\ wamp \ www \ w3\login.phpにあります。
<?php
session_start();
echo " <html>
<body>
<br/>
<table border = '0' width = '100%' height = '100%'><tr>
<td width = '30%' height = '100%'> </td><td valign = 'top'>
<a href='display.html'>Display</a>";
if(!isset($_SESSION['loged'])){
echo " <fieldset><legend>Log In</legend>
<center><table border = '0'>
<form action="log.php" method="post">
<tr><td>Username:</td><td><input type="text" name="username" /></td></tr>
<tr><td>Password:</td><td><input type="password" name="pwd" /></td></tr>
<tr><td colspan = '2' align = 'center'><input type="submit" value="submit" /></td></tr>
</form>
</table></center>
</fieldset> ";
}
else{
header(location:index.html);
die();
}
echo " </td><td width = '30%' height = '100%'> </td>
</tr></table>
</body>
</html>";
?>