|
||||||
| 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 | Display Modes |
|
|||||
|
Hey guys, sooo Im almost done with my site, all I need is to:
#1 finish the administrative side, (havent even started) #2 finish the testimony/review, (the part where you rate the host) #3 forums #4 Random stuff (terms of service, about, support, help, etc) So.. anywhere from a week to a month. ALRIGHT! Im extremely stuck on #2, I usually dont download and edit PHP scripts, just JS, but I had no idea where to start, other than maybe adding 1 to the number of times rated, then add the rating # to a field, so I could use some PHP math to get the average, and output that with a star image.. So I downloaded this script. <see attached> What im having an issue with is getting it to forget about the IP, forget about recording the raters data to a file, and make it use a MySQL database. How can I make it so instead of adding data to a file with a bunch of BS, it just updates the rating field in the MySQL table Thank you very much..
__________________
USE PROXY FOR BLOCKED SITES |
| Sponsored Links |
|
|
|
|||||
|
Thats what im trying to do, this code is just a lot different than I am used to. Im just having a hard time understanding it
__________________
USE PROXY FOR BLOCKED SITES |
|
|||||
|
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
__________________
USE PROXY FOR BLOCKED SITES |
| 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:
__________________
USE PROXY FOR BLOCKED SITES |
|
|||||
|
Thanks, and $count is the number of testimonies left on the host, and each testimony has left $ rate, but the rate could be 1 through 5.
__________________
USE PROXY FOR BLOCKED SITES |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP 5 and OOP | Jordan | PHP Tutorials | 0 | 04-04-2008 05:06 PM |
| PHP 4 end of life announcement | Jordan | Programming News | 4 | 08-30-2007 09:55 AM |
No contest at this time. Please check back later.