Witam otóż w poniższym kodzie występuje błąd. Dreamweaver wskazuje na linijkę 50. Co to za błąd?
Pozdrawiam.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dokument bez tytułu</title>
</head>
<body>
<pre>
<?php
if (isset($_POST['submit'])){ $name = $_POST['name'];
$id = $_POST['id'];
$adres = $_POST['adres'];
$przedmiot = $_POST['przedmiot'];
$mail = $_POST['mail'];
$tel = $_POST['tel'];
$student = array('Nazwisko' => $name, 'ID' => $id, 'Adres' => $adres, 'Przedmiot' => $przedmiot, 'e-mail' => $mail, 'Telefon' => $tel); foreach ($student as $key => $value){
echo "Twój $key to $value<br />"; }
}
?>
<table width="200" border="1">
<tr>
<td>Nazwosko</td>
<td><?=$name?></td>
</tr>
<tr>
<td>ID</td>
<td><?=$id?></td>
</tr>
<tr>
<td>Adres</td>
<td><?=$adres?></td>
</tr>
<tr>
<td>Przedmiot</td>
<td><?=$przedmiot?></td>
</tr>
<tr>
<td>Mail</td>
<td><?=$mail?></td>
</tr>
<tr>
<td>Tel</td>
<td><?=$tel?></td>
</tr>
</table>
<?php else{ ?> //tu występuje rzekomy błąd
Wypełnij formularz:
<form action="
<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
Podaj nazwisko:
<input type="text" name="name" /> <br />
Podaj ID:
<input type="text" name="id" /> <br />
Podaj Adres:
<input type="text" name="adres" /> <br />
Podaj Przedmiot:
<input type="text" name="przedmiot" /> <br />
Podaj e-mail:
<input type="text" name="mail" /> <br />
Podaj nr. telefonu:
<input type="text" name="tel" /> <br />
<input type="reset" value="Wyczyść" />
<input type="submit" name="submit" value="Wyślij" />
</form>
<?php } ?>
</pre>
</body>
</html>