edit_file.php
304 Bytes
<?php
session_start();
if($_SESSION['name']){
$edit = $_POST['edit'];
$file_name = $_POST['file_name'];
$file = fopen($file_name,'w') or die ("Unable to load file");
//chmod($file, 0777);
fwrite($file,$edit);
fclose($file);
header('Location: workArea.php');
}
else header('Location: index.php');
?>