Not writing to file, but no errors PHP

vowAdvosy

New Member
I am trying to write data from form inputs to a text file using PHP. The file seems to load correctly, but does not write the data.I have echoed the input values directly before trying to write to ensure they are not empty.The text file is in the same directory as the php file. I orginally got the error "Warning: fwrite(): supplied argument is not a valid stream resource" but corrected that by adjusting the permissions on the text file. My current code\[code\]$fp = fopen('sidebar_subscribers.txt', 'a');fwrite($fp, $name."\t".$email."\t".$leader."\t".$industry."\t".$country."\t".$zip."\r\n");fclose($fp);\[/code\]Why are the values not getting written to the text document?Is there anything on the server that php needs to be set up for that I should check?This is being used on a WordPress blog. Thanks! Issue is now resolved. The file was getting created and written in the wrong location. Thanks for all your help and suggestions. *
 
Back
Top