Ver Mensaje Individual
  #12 (permalink)  
Antiguo 03/11/2015, 13:11
pablomartinez_22
 
Fecha de Ingreso: noviembre-2015
Mensajes: 7
Antigüedad: 8 años, 6 meses
Puntos: 0
Respuesta: Simbolos en tabla mysql

Cita:
Iniciado por gonzaherrera77 Ver Mensaje
Ahora si mostrame tu archivo php como estas obteniendo esos datos y pintadolos en pantalla.
aca va el codigo completo, el query sql y la inserción en una tabla:

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="estilos.css">
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<meta name="author" content="Pablo Martinez">
<title>Antiparras</title>
</head>
<body>
<div class="cuerpo">
<?php
include ("encabezado.php");
?>
<?php
$sql = "SELECT * FROM acc_antiparras WHERE 1=1";
//echo $sql;
$res = mysqli_query ($conn, $sql);
/*if(!$res){
mysqli_error($conn);
}*/
$cant_total = mysqli_num_rows($res);
$cant_paginas = ceil($cant_total/REGXPAG);

if(!$_GET['pag']){
$_GET['pag']=1;
}

$sql .= " LIMIT ".($_GET['pag']-1)*REGXPAG. ", ".REGXPAG;
$res = mysqli_query($conn, $sql);
//echo mysqli_error($conn);
?>

</div>
<div id="centro">
<h1>Antiparras</h1>
<table width="1024px" cellpadding="5" cellspacing="0" border="1" align="center">
<tr bgcolor="#efc789">
<th width="200px">Marca</th>
<th>Producto</th>
</tr>
<?php
while($fila = mysqli_fetch_assoc($res)){
echo "<tr bgcolor='".(($i++%2==0)? "#ccc": "#fff")."'>
<td>".$fila['Marca']."</td>
<td>".$fila['Producto']."</td>
</tr>";
}
?>
</table>

<?php
for ($i=1; $i <= $cant_paginas; $i++) {
echo "<a href='acc_antiparras.php?pag=".$i."'>".$i." </a>";
}
?>
</div>
</body>
</html>