Page 2 of 2
Posted: Sat Nov 29, 2003 6:59 am
by mchaggis
Yes line 19 is:
Spot the deliberate mistake lol.... Always do this... yup I'v missed of a bracket:
Posted: Mon Dec 01, 2003 10:53 pm
by dull1554
it's printing Array to the text file after every news entry
Posted: Tue Dec 02, 2003 12:54 am
by mathewvp
Try this
Code: Select all
<?php
if((!isset($_POSTї'subject'])) or (!isset($_POSTї'news'])))
{
echo 'You must enter <b>ALL</b> fields before you can continue!';
exit;
}
$subject = $_POSTї'subject'];
$news = $_POSTї'news'];
$time = date("D d of F, h:i a");
$oldnews = implode('',file("news.txt"));
$fp = fopen("news.txt", "w");
$insertcode = "<table width='100%' border='0' cellspacing='1' cellpadding='2' bgcolor='#dcdcdc' align='center'><tr><td width='100%' border='1' bgcolor='whitesmoke'>".$subject." - ".$time."</td></tr><tr><td width='100%' border='1' bgcolor='#ffffff'>".$news."</td></tr></table><br>";
fwrite($fp, $insertcode);
fwrite($fp,$oldnews);
fclose($fp);
?>
Posted: Tue Dec 02, 2003 9:31 am
by dull1554
thanks man, i love this place, it works perfectly