Seite aus Formular aufrufen

clooney49

Grünschnabel
Versuche mittels Formular-Button eine Seite aufzurufen, haut aber nicht hin. Wer kann weiterhelfen?

Vielen Dank
Bernd

<html>
<body>
<?
if ($_REQUEST['mail']) {
header('LOCATION: neue_seite.php'); //funktioniert nicht
}
?>
<form method="post" action="<? echo $PHP_SELF ?>">
<INPUT type="submit" name = "clear" VALUE="clear">
<INPUT type="submit" name = "mail" VALUE="mail">
</td></tr></table>
</form>


</body>
</html>
 
Du darfst vor dem [phpf]header[/phpf]-Befehl keine Ausgabe(html) stehen haben.
In deinem Fall müsste es so lauten:
PHP:
<?php
if ($_REQUEST['mail']) {
    header('Location: neue_seite.php'); //funktioniert doch
}
?>
<html>
<body>

<form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<input type="reset" name = "clear" value="clear">
<input type="submit" name = "mail" value="mail">
</form>


</body>
</html>
 
Zurück