I can not display data from the Mysql table on the site

0
So I was doing a site by local host on wampserver, and it was working normally, now I put it to host hostiger, and it's not pulling any more data from the table. Does anyone know what it could be ??

//Codigo onde mostra os produtos

<?php


               error_reporting (E_ALL & ~ E_NOTICE & ~ E_DEPRECATED);
               require("banco.php");

        $server = "mysql.hostinger.com.br";

$db = "u888901778_users"; // Indique o nome do banco de dados que será aberto

$usuario = "u888901778_jo"; // Indique o nome do usuário que tem acesso

$password = "***********"; // Indique a senha do usuário    



//1º passo - Conecta ao servidor MySQL

$conect = mysql_connect($server,$user,$password ) or die (mysql_error());

//2º passo - Seleciona o Banco de Dados

$select_db = mysql_select_db($db) or die (mysql_error());


          $sql = "SELECT * FROM camiseta_Masc";

          $qr = mysql_query($sql) or die(mysql_error());

          while($ln = mysql_fetch_assoc($qr)){

                    echo '<div class="col-md-4 bottom-cd simpleCart_shelfItem">';
                    echo '<div class="product-at ">';
                    echo        '<a href="single.php"><img class="img-responsive" src="Produtos/Imagens/Camisetas masculinas/'.$ln['imagem'].'" />';
                    echo        '<div class="pro-grid">';
                    echo                    '<span class="buy-in">Buy Now</span>';
                    echo        '</div>';
                    echo    '</a>';
                    echo    '</div>';
                    echo    '<br>';
                    echo    '<font color="black" font face="Roboto" align="center" size="3px">'.$ln['nome'].'</font>';
                    echo '<p>';
                    echo     '<font color="#00688B" size="2px">Por R$ '.number_format($ln['preco'], 2, ',', '.').'</font>';
                    echo    '<div class="content">';
                    echo  '<a href="checkout.php?acao=add&id='.$ln['id'].'" class="botao01">Comprar</a>';
                    echo   '</div>';
                    echo '<br><br>';
                    echo   '</div>';
          }
                     ?>

 //Codico onde conecta ao banco

 <?php
    $server = "mysql.hostinger.com.br";
    $user = "u888901778_jo";
    $password = "************";
    $database = "u888901778_users";

try {
    $con = new PDO("mysql:host=$server;dbname=$database;", $user,$password);
} catch (PDOException $e) {
    die("Conexão falhou:".$e->getMessage());
}

 ?>
    
asked by anonymous 25.11.2017 / 13:43

0 answers