|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
devarticles.com rating system
hi
Could any1 plz write an article on how to implement a rating system such the one used in devarticiles?! thanx |
|
#2
|
|||
|
|||
|
I believe one has already been done. Take a look at Annette's article and see if it is what you are looking for.
__________________
Oh I wish, I wish I hadn't killed that fish... |
|
#3
|
|||
|
|||
|
Thanx markerdave
I though it would be a good idea to do it in php! The mentioned article is writen for ASP developeres! |
|
#4
|
|||
|
|||
|
mikle,
Do you know much ASP? I doubt that it would be too difficult to change the code from ASP to PHP. |
|
#5
|
|||
|
|||
|
read the article, and if you need any help converting the asp to php, just post it here.
|
|
#6
|
|||
|
|||
|
Hi there
I am an absolute newbie to PHP, and as such, would not know how to convert the code from ASP to PHP. Would it be possible to have the rating script in PHP? Thanks in advance. ![]() |
|
#8
|
|||
|
|||
|
1man
I've tried it, but after I click on the button the page stays on rate.php, with nothing showing up. No messages, nothing to say if the value has been entered to the db or otherwise. btw: the name of my first file is article.php, and following the instructions, second file is rate.php. Am I doing things right? |
|
#9
|
|||
|
|||
|
bigbear
I don't now where is the problem the code dose not work with me! i think the problem with id you will see the URL like this : http://you.com/rate.php?id= i will try to check the problem and answer you 1man |
|
#10
|
|||
|
|||
|
Yes!!! That's the exact thing that I see when I click the button. The page is empty, and the URL is the way you described it.
Being a newbie to something as powerful and useful as PHP sucks... hopefully the book which I ordered will reach me soon. ![]() |
|
#11
|
|||
|
|||
|
OK .. try this scripts..
file name : article.php PHP Code:
file name : rate.php PHP Code:
don't forget create the SQL table : PHP Code:
is every think ok ? I hope that 1 MaN ![]() |
|
#12
|
|||
|
|||
|
1man... it doesn't work. After clicking on Rate button, it just stays at the page. Nothing seem to happen.
![]() btw: How do I use images to display the ratings, and how do I use this on every article page? |
|
#13
|
|||
|
|||
man .. it's work with me !! did you change any think? look >> action=rate.php 1- How do I use images to display the ratings ? use IF and round like this : $Rating2 = round($Rating); if ($Rating = 5)) { <img src="stars" alt="" border=0><img src="stars" alt="" border=0><img src="stars" alt="" border=0><img src="stars" alt="" border=0><img src="stars" alt="" border=0> } do like that with 4 & 3 & 2 & 1 i think .. But maybe that wrong 2- how do I use this on every article page? go to table Article and Add : Votes & Num_Votes & Rate ID will be article ID that's all 1 MaN ![]() |
|
#14
|
|||
|
|||
|
The only thing I changed was the name of the db.
![]() |
|
#15
|
|||
|
|||
i don't now where is the problem check files name and press on Rate 999 time ![]() |
|
#16
|
|||
|
|||
|
Quote:
|