A little advice pleaseż!?ˇ
I made a poll using basic ASP coding. I have access to a database but don't know how to use it(funny, huh?). When the user clicks on a poll answer, the value of the radio button is wrote to a text file. I was wondering if it was possibe to have ASP read the textfile, observe the results, and then post the results percentage wise? A response would be greatly appreciated.
dont go down the text file route - destined for disaster. You need to write the value of the radio to a database field. Then to display the results you count how many results there are in the database and how many of each answser there are (two queries, one which returns all results and one which returns specific results ie "select * from votes where answer = false"). Then you divide the second number by the first, and voila you have a percentage.
If you dont know how to connect your poll to the database then I'd suggest these resources:
ASP tutorials and applications
Kath's Active server pages
ASP from HTML goodies
I'd strongly suggest trying to get to grips with it all from a tutorial than simply waiting for some nice chap (or chapess) to post the answer here - you've a much better chance of really understanding it from a tutorial I would guess - but I'm sure that people will be happy to help if you're having further problems.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)