OwlCyberSecurity - MANAGER
Edit File: game-rating-result.php
<?php include("includes/config.php"); include("includes/conexao.php"); $idg = filter_input(INPUT_POST, 'id'); $query = $db->prepare("SELECT * FROM game WHERE idg=:idg"); $query->execute(array('idg'=>$idg)); $result = $query->fetch(PDO::FETCH_ASSOC); $ponto_do_game = $result['votos'] > 0 ? $result['ponto'] / $result['votos'] : 0; $ponto_do_game = number_format($ponto_do_game,2); if($result['votos'] > 0) { ?> <span style="color: yellow"> <?php echo $ponto_do_game; ?> ( <?php if($result['votos']==1){ echo $result['votos'] . " vote"; } else{ echo $result['votos'] . " votes"; } ?> ) </span> <?php }