Ciao a tutti, premetto che sono un neofita di PHP, per la verità lo sto imparando in tempo reale.
Svolgendo un esercizio all'interno di una guida PHP5, mi sono imbattutto in un errore che non riesco a capire.eccolo:
ho creato 2 pulsanti submit "prova5" e prova6" in html:
[COLOR=blue]<form name="form1" action="prova7.php" method="post">
<input type="submit" name="button" value="prova5" />
</form>
<form name="form2" action="prova7.php" method="post">
<input type="submit" name="button" value="prova6" />
</form>
In un file a parte "prova7.php" ho creato lo script:
[COLOR=red]<?php
$_redirect="location: ".$_REQUEST["button"] . ".html";
echo header($redirect);
?>
Eseguendolo mi da il seguente errore:Warning:
[B]Cannot modify header information - headers already sent by (output started at C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\prova7.php:9) in C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\prova7.php on line 11
Qualcuno saprebbe indicarmi perchè e dove sbaglio?![]()
Grazie a tutti