Results 1 to 6 of 6

Thread: polling Script Required

  1. #1

    Thread Starter
    Addicted Member Hammad's Avatar
    Join Date
    Mar 2003
    Location
    Pakistan
    Posts
    145

    Question polling Script Required

    Hi Guys i m new in PHP can any body have Polling Script with out using database please sent me thanks
    Hammad Umar

  2. #2
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    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.
    Have I helped you? Please Rate my posts.

  3. #3

    Thread Starter
    Addicted Member Hammad's Avatar
    Join Date
    Mar 2003
    Location
    Pakistan
    Posts
    145
    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
    Hammad Umar

  4. #4
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Well how are you going to store or remember how many hits have been collected so far?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  5. #5

    Thread Starter
    Addicted Member Hammad's Avatar
    Join Date
    Mar 2003
    Location
    Pakistan
    Posts
    145
    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
    Hammad Umar

  6. #6
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    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.
    Have I helped you? Please Rate my posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width