the file specified in $file must be writable by the web-server.
//you know where the CSS is, so no need to let the user choose the file
//perhaps confusingly, deal with the submission first
$fp=fopen($file,'w+'); //open the file for *w*riting
$fwrite($fp,$_POST['css']); //write the contents
fclose($fp); //remember to close the file
//to display the form
$css=file_get_contents($file); //read in the file contents
//no need for php to get in the way for a while...
<form action="" method="post">
<textarea rows="10" cols="40" name="the_css">
<?php echo $css; ?>
<input type="submit" value="Submit" />
Accepting the file location from the user, is a really really stupid thing to do.
Remember though, that people could put things in the CSS that you might not want them to.