LoMo
Erfahrenes Mitglied
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Forumular Test</title>
</head>
<body>
<?php
if (isset($_POST['sent']) & isset($_POST['name']))
{
echo <<<FORMANSWER
Sie haben folgende Nachricht gesendet:<p />
<b>Ihr Name:</b> {$_POST['name']} <br />
<b>E-Mail:</b> {$_POST['email']} <br />
<b>Bewertung:</b> {$_POST['rank']} <br />
<b>Ihre Nachricht:</b> {$_POST['message']} <br />
<b>Gekauft bei:</b> {$_POST['purchase']}
<form method="post" action="{$_SERVER['PHP_SELF']}">
<input type="submit" value="Neue Nachricht senden?" />
</form>
FORMANSWER;
}
else
{
?>
<h3> wie hat Ihnen das Buch bisher gefallen?</h3>
<form method="post" action="<?=$_SERVER['PHP_SELF']?>"> //FEHLER SIEHE UNTEN
<table>
<tr>
<td>Mein Name:</td>
<td><input type="text" name="name" size="50" /></td>
</tr>
<tr>
<td>Meine E-Mail:</td>
<td><input type="text" name="email" size="50" /></td>
</tr>
<tr>
<td>Bewertung:</td>
<td>
1<input type="radio" name="rank" value="1" />
2<input type="radio" name="rank" value="2"
checked="checked"/>
3<input type="radio" name="rank" value="3" />
4<input type="radio" name="rank" value="4" />
5<input type="radio" name="rank" value="5" />
(Schulnoten)
</td>
</tr>
<tr>
<td valign="top">Nachricht:</td>
<td>
<textarea cols="30" rows="6" name="message">
Ihre Nachricht...</textarea>
</td>
</tr>
<tr>
<td>Wo haben Sie es gekauft?</td>
<td>
<select size="1" name="purchase">
<option value="Fachbuchhandel" >Fachbuchhandel</option>
<option value="Kaufhaus" >Kaufhaus</option>
<option value="Online" >Online</option>
<option value="Verlag" >Verlag</option>
<option value="Nur geliehen" >Nur geliehen</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="Absenden" />
<input type="reset" />
<input type="hidden" name="sent" value="1" />
</td>
</tr>
</table>
</form>
<?php
} /* end if */
?>
}
?>
</body>
</html>
FEHLER: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in C:\Programme\Apache Group\Apache2\htdocs\Formular.php on line 28
weiss jemand was ich falsch gemacht hab ?
mfg lomo