Re: [PHP] please help with this simple problem

2001-03-22 Thread adam
it works now, only it's earasing everything and then writing to the file. i think we have almost got this figured out. here's what the code looks like for the entire tag... --- ", $message); $date = date("l, F j Y, h:i a"); $message = "mailto:$email>$name -- $da

Re: [PHP] please help with this simple problem

2001-03-22 Thread adam
it works now, only it's earasing everything and then writing to the file. i think we have almost got this figured out. here's what the code looks like for the entire tag... --- ", $message); $date = date("l, F j Y, h:i a"); $message = "mailto:$email>$name -- $da

RE: [PHP] please help with this simple problem

2001-03-22 Thread Stewart Taylor
wart -Original Message- From: adam [mailto:[EMAIL PROTECTED]] Sent: 22 March 2001 12:00 To: [EMAIL PROTECTED] Subject: Re: [PHP] please help with this simple problem i tryed it and it ended up having an error that was caused originally by a lack of a $ on the 3rd line variable... after

Re: [PHP] please help with this simple problem

2001-03-22 Thread rui
you haven't specified the open type (a = append, w = write, r = read only , etc etc) solution $fp=fopen(basename($fname), "a"); just to match your example. On 22-Mar-2001 adam wrote: > i tryed it and it ended up having an error that was caused originally by a > lack of a $ on the 3rd line var

Re: [PHP] please help with this simple problem

2001-03-22 Thread adam
i tryed it and it ended up having an error that was caused originally by a lack of a $ on the 3rd line variable... after i fixed that it said wrong perameter count for fopen() on the third line, and "Warning: Supplied argument is not a valid File-Handle resource" for the remaining lines below that

RE: [PHP] please help with this simple problem

2001-03-22 Thread Stewart Taylor
You need to copy the contents of the current file. Then recreate the file by writing the new message then writing back the original contents. e.g. $fname = basename($PHP_SELF). ".comment"; $fsize = filesize($fname); fp = fopen(basename($fname)); $data = fread($fp,fsize); fwrite($fp,$message); fwr