私は数日間この作業をしてきましたが、何が間違っているのか分かりません。それは '文法エラー予期しないファイルの終わりを返すように私はどこかの中括弧を逃したと思うが、私はどこに見えないのですか?どんな助けもありがとう。私は2つのファイルがあり、私はPHPで乗算表を作ろうとしています。私は数日間このテーブルを作業していました
ページ1:
<!DOCTYPE html>
<html>
<head>
<title>Make a Multiplication Table!</title>
</head>
<body>
<form action="./timestable.php" method="POST"/>
<input type="number" value="1" name="a"/>
<input type="number" value="1" name="b"/>
<input type="submit"/>
</form>
</body>
</html>
<?php
$n = $_POST; // TODO what should $n really be? Replace the 10 with the user-supplied value from the form
// if we don't have a number, redirect back to the form page
if (isSet($n)) {
header("Location: ./mult_form.php");
exit;
}
?>
ページ2:10件の事のようにあなたが/のは、本題に聞かせて変更する必要があります可能性は別に
<!DOCTYPE html>
<html>
<head>
<title>Your Table is Ready</title>
</head>
<body>
<table>
<?php
$a = $_POST['a'];
$b = $_POST['b'];
for ($i = 0; $i <($a)+1; $i++):
{
$output.='<tr>';
for($j=1;$j<($b)+1;$j++)
{
$output.= '<td>'.($i*$j).'</td>';
}
$output.='<tr>';
}
$output.='</table>';
?>
</body>
</html>
'($ I = 0; $ iのための<($ a)は+1を、私は++ $):' - > '($ i = 0 $私は++; $私は($ a)は+1を<)のための' –
<フォームアクション=「./ timestable.php」方法= 『POST』 /> ./それは問題を説明するように、あなたの質問のタイトルを改善し、エンド – svanderwoude
で/をamdの削除。 –