Ok, so I have textarea that posts data to this processor file. Everything seems to work fine except for the fopen
<?php
$update = $POST['style'];
$uploaddir = $SESSION['username'];
echo $update;
$handle = fopen($uploaddir."/"."dhcstylesheet.css", "w");
if(!$handle)
{die("Error opening file for writing");}
fwrite($handle, $update);
fclose($handle);
echo "Your stylesheet has been successfully edited!";
?>
It just keeps returning the die error. The echo $update displays the properly edited text from the post, but for some reason the fopen doesn't work. Any ideas?