Hey guys,
Do u know what is wrong with this piece of code. He gets all teh correct values but when i try to save the value's then something is going wrong because he didn't save the value's 😕
if ($submit) {
$configfile="<"."?
########## CONFIG ##########
\$smilies = \"$smilies\";
\$max_char = '$max_char';
\$max_lengte = \"$max_lengte\";
\$max_verhaal = \"$max_verhaal\";
\$help_popup = \"$help_popup\";
\$filter = \"$filter\";
########## EINDE CONFIG ##########
?".">";
$filenum=fopen("config.php","w");
fwrite($filenum,$configfile);
fclose($filenum);
$filenum=fopen("badwords.txt","w");
fwrite($filenum,$badwords);
fclose($filenum);
echo "Bedankt, de instellingen zijn opgeslagen.";
} else {
$badwordso = fopen("badwords.txt","r");
$badwords = fread ($badwordso, filesize ("badwords.txt"));
fclose($badwordso);
?>
<form action=<?=$PHP_SELF?> method=post>
<table border=0 cellpadding=2 cellspacing=0 width=100%>
<input type=hidden name=admin_action value=admin>
<input type=hidden name=admin_adminaction value=settings>
<tr><td align=right width=50%><b>Gebruik van smilies? </b></td><td><input type="radio" onFocus="if(this.blur)this.blur()" style="border: 0px" name="admin_smilies2" value="1"<?if($smilies==1){echo" checked";}?>>Ja <input type="radio" onFocus="if(this.blur)this.blur()" style="border: 0px" name="admin_smilies2" value="0"<?if($smilies==0){echo" checked";}?>>Nee</td></tr>
<tr><td align=right width=50%><b>Het max. aan karakters in de naam : </b></td><td><input type=text name="admin_karlengte2" value=<?=$max_char?>></td></tr>
<tr><td align=right width=50%><b>De max. lengte van het bericht : </b></td><td><input type=text name="admin_lengte2" value=<?=$max_lengte?> ></td></tr>
<tr><td align=right width=50%><b>Hoeveel berichten er per pagina worden getoond : </b></td><td><input type=text name="admin_liemiet2" value=<?=$max_verhaal?> ></td></tr>
<tr><td align=right width=50%><b>Schakel de help popup aan? </b></td><td><input type="radio" onFocus="if(this.blur)this.blur()" style="border: 0px" name="admin_popup2" value="1"<?if($help_popup==1){echo" checked";}?>>Ja <input type="radio" onFocus="if(this.blur)this.blur()" style="border: 0px" name="admin_popup2" value="0"<?if($help_popup==0){echo" checked";}?>>Nee</td></tr>
<tr><td align=right width=50%><b>Schakel de worden filter aan? </b></td><td><input type="radio" onFocus="if(this.blur)this.blur()" style="border: 0px" name="admin_filter2" value="1"<?if($filter==1){echo" checked";}?>>Ja <input type="radio" onFocus="if(this.blur)this.blur()" style="border: 0px" name="admin_filter2" value="0"<?if($filter==0){echo" checked";}?>>Nee</td></tr>
<tr><td valign=\"top\" align=right width=50%><b>Worden filter : </b><br>slechte woord|vervangend woord<br>1 per lijn</td><td><textarea name=badwords rows=6 style=\"width: 100%\"><?=$badwords?></textarea></td></tr>
<tr><td> </td><td><input type=submit name=submit value=Verstuur></td></tr>
</table>
</form>
<?
}
Hope someone can help me.
Vinnie