
January 20th, 2006, 07:13 PM
|
|
|
|
Join Date: Apr 2007
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
help with writing to text file
I'm writing to a text file. Is there some code I can add that will ensure that if two or more users are sending form information at the same time, or if my client is accessing the text file to retrieve the inormation, that alll the results will get posted?
Thanks.
This is my code:
php Code:
Original
- php Code |
|
|
|
$fp = fopen("form-results/form-results.txt", "a"); fwrite($fp, $_POST['fname'] . "|" . $_POST['lname'] . "|" . $_POST['church_org'] . "|" . $_POST['street'] . "|" . $_POST['city'] . "|" . $_POST['state'] . "|" . $_POST['zip'] . "|" . $_POST['non_us_address'] . "|" . $_POST['country'] . "|" . $_POST['phone'] . "|" . $_POST['email'] . "|" . $_POST['position'] . "|" . $_POST['source'] . "|" . $_POST['download'] . "|" . $_POST['platform'] . "|" . $_POST['comment'] . "|" . $fp = fopen("seo-results/seo-results.txt", "a"); fwrite($fp, $_POST['source'] . "|" . $_POST['email'] . "|" .
|