Why does this show an error after the second if statement?
Posted: Fri Jun 25, 2004 4:35 pm
Code: Select all
if($save){
if($TheFile="form_data/$_POSTїsave].txt";
$Open = fopen($TheFile,"w");
if($Open){
fwrite($Open,"$editing\n");
fclose($Open);
$Worked=True;
}else{
$Worked=False;
}
return $Worked;
){
print("<TR><TD colspan=5><CENTER>file created/updated");
}else{
print("<TR><TD colspan=5><CENTER>Error occured during processing please go back and retry");}
}I had a workin version but have lost it so need this one to work.
Have made the write to file a separate functon but its to do with the line $TheFile. Please help
thanks
Andy