sumatoria de columnas en php y mysql con las variables de aqui
Publicado por Arnulfo (4 intervenciones) el 27/06/2019 21:13:29
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<html>
<body>
</br>
<form action="Ent.html" method="POST">
<input type="submit" value="regresar" name="regresar">
</form>
</br>
</body>
</html>
<?php
$server = "localhost";
$usuario = "root";
$contraseña = "";
$bd = "hola";
$conexion = mysqli_connect($server, $usuario ,$contraseña ,$bd)
or die ("error en la conexion");
$consulta = mysqli_query($conexion , "SELECT * from datos")
or die ("error al traer los datos");
echo '<table border="3">';
echo '<tr>';
echo '<th id="numero">Numero</th>';
echo '<th id="entrada">Entrada</th>';
echo '<th id="marca">Marca</th>';
echo '<th id="material">Material</th>';
echo '<th id="referencia">Referencia</th>';
echo '<th id="importe">Importe</th>';
echo '</tr>';
while ($extraido = mysqli_fetch_array($consulta))
{
echo '<tr>';
echo '<td>'.$extraido['numero'].'</td>';
echo '<td>'.$extraido['entrada'].'</td>';
echo '<td>'.$extraido['marca'].'</td>';
echo '<td>'.$extraido['material'].'</td>';
echo '<td>'.$extraido['referencia'].'</td>';
echo '<td>'.$extraido['importe'].'</td>';
echo '</tr>';
}
mysqli_close($conexion);
echo '</table>';
?>
Valora esta pregunta


0