Ik krijg deze error:
Dit is de code:
Als ik dit er uit haal werkt het wel:
Weet iemand het problem?
Warning: Cannot modify header information - headers already sent by (output started at /home/dylanzk57/domains/dylanproductions.nl/public_html/sander/scripty.php:4) in /home/dylanzk57/domains/dylanproductions.nl/public_html/sander/scripty.php on line 5 Dit is de code:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"POST"[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]<script style="text/javascript"> alert("Je hebt succesvol een naam ingegeven! Je wordt doorgestuurd!");</script>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Refresh:1; url=scripty.php?naam="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]))
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]Naam is succesvol gezet![/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000] Er is nog geen naam ingevuld, vul hem in:[/COLOR][COLOR= #007700];
}
}[/COLOR]
?>
<form method="post" action="#">
<input type="text" name="naam">
<input type="submit" value="Ok">
</form> Als ik dit er uit haal werkt het wel:
echo<script style="text/javascript"> alert("Je hebt succesvol een naam ingegeven! Je wordt doorgestuurd!");</script>; Weet iemand het problem?
Toch bedankt