Ive been trying to work this out:
if(isset($_POST['server'])):
$block = $_POST['ip'];
$file_handle = fopen($file, "a+");
$content = "
" . $block;
fwrite($file_handle, $content);
fclose($file_handle);
endif;
just doesnt write it in the file. I do have the $file stated.
Put a check in to see if the fopen is successful
if($filehandle) {
// do something
}
I suspect you will find that the file is not open