Code: Select all
function submit()
{
$outputstring = "test"
$fp = fopen("$file", "w");
fwrite($fp, $outputstring);}
}Line 27 = closing bracket for function submit
Also, is it possible to write variables using fopen and fwrite? for example I want to write into a PHP file, $var1 = "variable 1"; how would I do that?