For starters:
$fp = fopen("file.txt", "a+");
$fwrite = ("sup", "w");
This is not ok; if the file fails to open, you can't write to it. Instead, say
if ($fp = fopen("file.txt", "a+"))
{
fwrite(...);
fclose($fp);
}
else
echo "Something went wrong: $php_errormsg";
Next, you don't really need "a+" mode unless you expect to rewind or seek to earlier parts of teh file and read from there. Just plain "a" mode is all you need.
Finally, and most interestingly, you're not calling fwrite. Instead, you're assigning something to a variable called $fwrite. Instead, call the function in the manner described on the manual page:
fwrite($fp, "something\n");