[thelist] php writing to a file

Andrew Maynes andrew at uk-webdeveloper.co.uk
Thu May 23 03:51:01 CDT 2002


Some while back I asked to write form information into a file and was provided
with this

$string = implode("\t",$_POST);
$fp = fopen("file.txt","w");
fwrite($fp,$product);
fclose($fp);

it seems this can sit anywhere in the form.  It does write to a file called
file.txt

However, this aint a solution.  I need for each different user to be able to
write to a different file and inparticular to be able to identify with that file
later specifically in assocaition with the user who submitted the info :) does
that make sense?

Presumably I need have a session generate a new file for each visitor and then
for the session to know that a file will be waiting to be written to?

or could I keep writing each visitors info to the same file?  The code above
will not recognise individual users it will only overwrite anything submitted
rfom the form!

Andrew



**********************************************************************
Information in this email is confidential and may be privileged.
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system.
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone.
Thank you for your co-operation.
**********************************************************************
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.362 / Virus Database: 199 - Release Date: 5/7/02





More information about the thelist mailing list