|
||||||
| PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
| Sponsored Links |
|
|
|
|||||
|
In the hosts profile, store the number of votes and the total value of the votes. When a vote is cast, update the hosts profile...It is trivial (unless I am missing something)
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||||
|
Write your own code. It is simple:
1) An HTML select form 2) Add a new row per vote with host id 3) Take the value of all votes and divide by the number of votes You have the average vote number in a few PHP steps. It does seem trivial compared to what you have already written.....
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog Don't hesitate to ask any questions that you have! Check out our ASCII Calculator! |
|
|||||
|
it seems so, what you say requires a whole new table, that doesnt work so well for me :P
how about add the vote # to the total vote number (scale 1 to 5, user votes 4, adds 4 to the total) meanwhile it adds 1 to the voted number, so it will divide voted_number by vote_number |
| Sponsored Links |
|
|
|
|||||
|
Hum, it seems so, I guess looking at the other code just complicated it...
here is what I did. Update Times Rated PHP Code:
Echo The Stars PHP Code:
|
|
|||||
|
Nice work!
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog Don't hesitate to ask any questions that you have! Check out our ASCII Calculator! |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP 5 and OOP | Jordan | PHP Tutorials | 2 | 07-17-2008 09:43 AM |
| PHP 4 end of life announcement | Jordan | Programming News | 4 | 08-30-2007 09:55 AM |