...

View Full Version : where would i put the code to add to db



raptrex
07-17-2007, 04:08 AM
ok im using this up/down script i found here
http://www.shawngo.com/thumber-rating-script.php
but it doesnt save the score in a db so i decided i would make one

but im not familiar with javascript/ajax
so where would i put the php to add the vote to the db

would i put it in with one of the js files like voter.js?

hadiman
07-17-2007, 04:32 AM
i'm not ajax expert, but maybe it will help.


Voter = {
vote : function(what_in){
.....
.....
var myAjax = new Ajax.Request( 'vote.php', { method: 'get', parameters: pars, onComplete: this.showResponse })
....
....

in code above 'vote.php', is in the same folder .

:thumbsup:

raptrex
07-17-2007, 04:39 AM
just to be clear, put it in a new file, vote.php
and add that line to voter.js
right?

hadiman
07-17-2007, 05:05 AM
maybe only vote.php. (if not exist).

for that line of code, i copy that code from
http://www.shawngo.com/thumber-rating-script.php

if you not change anything in voter.js,
i believe it already there...


:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum