Re: [PHP4]
| From: | Joe Brown | Date: | Sun, 25 Mar 2001 07:58:41 +0000 |
| Subject: | Re: [PHP4] | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45473@lists.php.net to get a copy of this message | ||
if($formSubmit) {
echo "form submitted: $frmName"; //<= have you tried this to make sure
$formSubmit is true?
$newsSubmit = file("news.txt"); //RTM, your not using file() the way it's
inteneded.
$fp = fopen("news.txt", 'a'); //looks good
fwrite($fp, $frmName); //looks good, but does $frmName contain anything?
fclose($fb); //$newsSubmit is not a file pointer and should not be used as
such, use $fp instead.
} else {...
good luck
""Dddogbruce (@home.com)"" <ddogbruce@home.com> wrote in message
news:3ABD8A9C.E20A93AD@home.com...
> I've defined all the variables in the form, and have all the files..
>
> <HTML>
> <TITLE>Submit News</TITLE>
> <BODY>
> Your news has been processed and added to the main page. Thanks!
> <?
> if($formSubmit) {
> $newsSubmit = file("news.txt");
> $fp = fopen("news.txt", 'a');
> fwrite($fp, $frmName);
> fclose($newsSubmit);
> } else {
> include ("newsForm.php");
> }
> ?>
> </BODY>
> </HTML>
>
> See any problems? It won't dump $frmName onto the .txt file.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>