Re: [PHP] fwrite() question

2003-07-01 Thread Jason Wong
On Tuesday 01 July 2003 22:12, Adam Williams wrote: > when I do that, nothing is written to news.txt, and I'm not sure why. Well find out why! > This is the entire script: > > if ($_POST['news']) > { > $fp = fopen( "news.txt", "w"); Add some error-checking to see whether fopen() was su

Re: [PHP] fwrite() question

2003-07-01 Thread Adam Williams
Hi, when I do that, nothing is written to news.txt, and I'm not sure why. This is the entire script: unable to write to news.txt"; exit; } Header("Location: http://archives1.mdah.state.ms.us/news.php"; ); } ?> News update Please make your changes below and then click

Re: [PHP] fwrite() question

2003-07-01 Thread Adrian
you should use $_POST['news'] instead of "$POST_['news']". ans you also should'nt put " around variables ;) > Hello, > I have a block of code: > if ($_POST['news']) > { > $fp = fopen( "news.txt", "w"); > $success = fwrite( $fp, "$POST_['news']" ); >

[PHP] fwrite() question

2003-07-01 Thread Adam Williams
Hello, I have a block of code: unable to write to news.txt"; exit; } Header("Location: http://archives1.mdah.state.ms.us/news.php"; ); } ?> and when I access it, I get the error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /usr/l