Forum Moderators: coopster
<div class="Box5">
<div class="Boxtitle1"> .. <a name="a" id="a">a</a> ..</div>
<div class="Boxcontent">
<a href="authors/n_asher.php">Neal L Asher</a> - writes science fiction<br>
<a href="authors/s_aylett.php">Steve Aylett</a> - writes alternative fiction
<br><br><a href="article.php?1.255">back to top</a></div>
</div>
I assume the authors are stored in a db, if so you can add a "rating" column to the db. It could probably be a float. You can also add a "number of votes" integer column.
You add a link to your rating page, open in same or new window, you pass it the author_id or some other unique identifier for authors. They get the lovely html page where they can select a rating for the author in question.
on submit
select the number of votes and present rating then
dbnumvotes * dbrating + submittedrating / (dbnumvotes + 1) = newrating
insert newrating and dbnumvotes + 1 into db and send them off to a thank you for voting page.
I'd like the rating to be directly on the a-z page next to each author's name, i.e. using previous code:
<div class="Box5">
<div class="Boxtitle1"> .. <a name="a" id="a">a</a> ..</div>
<div class="Boxcontent">
<a href="authors/n_asher.php">Neal L Asher</a> - writes science fiction - RATING SYSTEM HERE<br>
<a href="authors/s_aylett.php">Steve Aylett</a> - writes alternative fiction - RATING SYSTEM HERE
<br><br><a href="article.php?1.255">back to top</a></div>
</div>
RATING SYSTEM HERE
yep, you can put it wherever you want, that's just a front end thing. It will still have to make a request to the server (ie. load a new page of some sort) to query db to get, update and store data.
You will have to store data in the db for each author if you want each one to have an individual rating.
You might want to take a look through the data in the db to see what is actually in there for you to use. Then you can understand what needs to be built.