Hi Guys i m new in PHP can any body have Polling Script with out using database please sent me thanks
Printable View
Hi Guys i m new in PHP can any body have Polling Script with out using database please sent me thanks
Google gave me answers straight away
http://www.ftls.org/en/examples/php/php_poll.php3
http://www.proxy2.de/scripts.php
Edit: ah crap, you said without databases. Well, you have to store the info somewhere. You could save it as txt files, but then it'll be slower. Do a search for saving/reading files. There's plenty of it. You'll also need to be able to parse it quite well.
Hi Agan is there no way of using object for polling in php like counter etc.... if there is i think it will be faster then text file or database. thanks
Well how are you going to store or remember how many hits have been collected so far?
i don't want to calculate the hits i want to count the polling in yes or no only so i think tat may be there is any thing which can be use. thanks:wave:
Hammad, you need to keep a count of the "yes"es and "no"s, so you need to store data. You can do this in a database or in files. Since you don't want to use databases that leaves files. Now all you have to do is simply search for how to read/write files in PHP.
Just store the data in this fashion:
[yes],[no]
eg,
123,89
That would make it extremely simple for you to parse when reading the file.