Answer the question
In order to leave comments, you need to log in
Voting problems
The situation is this. There is index.php, two pictures appear on it and a person votes for one of them. The problem is that when voting for the second photo, the first one still wins. What to do?
rate.php (responsible for adding and subtracting votes) jsfiddle.net/Rg7vf/
index.php jsfiddle.net/ad3PM/1/
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
if ($_POST['winner'] == $_POST['first']){
$looser = $_POST['second'];
} else {
$looser = $_POST['second'];
Something tells me that the error is somewhere here.
Have you decided to follow in the footsteps of Mark Zuckenberg?
It seems to me that it is better to make 2 forms with input hidden and the same names of these fields. Then one value will come - the id of the image.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question