ok will change that thanks but can anyone tell me why it doesnt write to the results.txt file? no matter i solved it [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>send results</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form name="form" method="post" action="insert.php"> <p>Type of match - Friendly, league, last minute or mess around </p> <p> <input type="text" name="textfield4"> </p> <p>Opponents </p> <p> <input type="text" name="clan"> </p> <p>Score</p> <p> <input type="text" name="score"> </p> <p>Man of match</p> <p> <input type="text" name="manofmatch"> </p> <p>Write up</p> <p> <textarea name="writeup"></textarea> </p> <p> </p> <p> <input type="submit" name="Submit" value="Submit"> </p> </form> </body> </html> <? } [/quote] [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] <?php $type=$_POST['type']; $Clan=$_POST['clan']; $score=$_POST['score']; $manofmatch=$_POST['manofmatch']; $writeup=$_POST['writeup']; $fp = fopen("results.txt","r+"); if(!$fp) { print "error! The file could not be opened"; exit; } $stringtowrite=$Clan."|".$score."|".$manofmatch."|".$writeup."|".$type; fwrite($fp, $stringtowrite); fclose($fp); ?> Results submited[/quote] was missing a php tag and a $ on the fclose function.