I wrote this script but it doesn't work. Probably it's something stupid, but I'm breaking my head and I can't seem to find what's wrong. Could anyone please help?
Greetz,
Tim
<?php
$number = $number1."-".$number2."-".$number3;
if($number == 100-000-000)
{
$won = "ja";
}
else
{
$won = "nee";
}
if($checkboxlijst==1)
{
$lijst = "wel";
}
else
{
$lijst = "niet";
}
if ($number == 100-000-000)
{
if ($submit == 2)
{
header ("Location: nowin.php?voornaam=$voornaam");
$fp = fopen("file.txt","a");
if($fp)
{
<br>
$stringtowrite="\n".$naam."|".$voornaam."|".$email."|".$straat."|".$huisnummer."|".$bus."|".$gemeente."|".$postcode."|".$lijst."|".$number."|".$won;
fwrite($fp, $stringtowrite);
fclose($fp);
}
else
{
print "error! The file could not be opened";
exit;
}
}
else
{
header ("Location: win.php?naam=$naam&voornaam=$voornaam&email=$email&straat=$straat&huisnummer=$huisnummer&bus=$bus&gemeente=$gemeente&postcode=$postcode")
}
}
else
{
header ("Location: nowin.php?voornaam=$voornaam");
$fp = fopen("file.txt","a");
if($fp)
{
$stringtowrite="\n".$naam."|".$voornaam."|".$email."|".$straat."|".$huisnummer."|".$bus."|".$gemeente."|".$postcode."|".$lijst."|".$number."|".$won;
fwrite($fp, $stringtowrite);
fclose($fp);
}
else
{
print "error! The file could not be opened";
exit;
}
}
?>