Re: voting using text files

From: Date: Wed, 22 May 2002 17:02:40 +0000
Subject: Re: voting using text files
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-98764@lists.php.net to get a copy of this message
Nick: > I have to build a php 'survey' app. but cannot use a db, > clearly text files are the way but I wondered, before I start if any of > you have done similar and might offer any words of wisdom? Everyone thus far has recommended file locking. Another way is to create a new file for each vote, naming the new file with a date/time/microtime with each vote. You start or end the file name with something unique (a number or letter, etc) to each answer, OR, put the file in a particular directory depending on the answers. Then, it's easy to count how many people voted a particular way just by counting the number of files. For example, at a unix type command line, you can type "ls | wc -l" --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

« previous php.general (#98764) next »