I know the topic has been treated in many questions, but I could not find the solution. I have read and tried many topics,(like 1, 2) but none seem to work on my page. The echo always returns 0 (while the data is 40)
here is my code:
$BIS = "SELECT COUNT(*) as count FROM Voti
WHERE sito='$sito' AND utente='$utente'";
#$topics= mysql_query($BIS);
#echo $topics['count']; <- this doesn't work
while($row = mysql_fetch_array($BIS)){
echo $row['count']; <- this doesn't work
}
if($topics['count']==0){ <- ever 0
$query = " INSERT INTO `Voti` (`utente`,`sito`,`voto`)
VALUES ('$email','$sito', $voto)";
mysql_query($query);
}
Sorry for duplicate entry, but i don't found the error p.s. sorry for my bad english