Gracias de nuevo, ya hice lo que me dices y tengo lo siguiente:
Código PHP:
Ver original<?php require_once('Connections/farmacia.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ?
intval($theValue) : "NULL"; break;
case "double":
$theValue = ($theValue != "") ?
"'" . doubleval($theValue) . "'" : "NULL"; break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if ((isset($_GET['eliminar'])) && ($_GET['eliminar'] != "")) { $deleteSQL = sprintf("DELETE FROM factura_ingreso WHERE Id=%s", GetSQLValueString($_GET['eliminar'], "int"));
}
$maxRows_listaringreso = 10;
$pageNum_listaringreso = 0;
if (isset($_GET['pageNum_listaringreso'])) { $pageNum_listaringreso = $_GET['pageNum_listaringreso'];
}
$startRow_listaringreso = $pageNum_listaringreso * $maxRows_listaringreso;
$query_listaringreso = "SELECT * FROM factura_ingreso";
$query_limit_listaringreso = sprintf("%s LIMIT %d, %d", $query_listaringreso, $startRow_listaringreso, $maxRows_listaringreso);
if (isset($_GET['totalRows_listaringreso'])) { $totalRows_listaringreso = $_GET['totalRows_listaringreso'];
} else {
$all_listaringreso = mysql_query($query_listaringreso); }
$totalPages_listaringreso = ceil($totalRows_listaringreso/$maxRows_listaringreso)-1; ?><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<table border="1">
<tr>
<td>Id</td>
<td>numfactura</td>
<td>nombre</td>
<td>cantidad</td>
<td>fecha</td>
<td>precio</td>
<td>iva</td>
<td>proveedor</td>
<td>Eliminar</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_listaringreso['Id']; ?></td>
<td><?php echo $row_listaringreso['numfactura']; ?></td>
<td><?php echo $row_listaringreso['nombre']; ?></td>
<td><?php echo $row_listaringreso['cantidad']; ?></td>
<td><?php echo $row_listaringreso['fecha']; ?></td>
<td><?php echo $row_listaringreso['precio']; ?></td>
<td><?php echo $row_listaringreso['iva']; ?></td>
<td><?php echo $row_listaringreso['proveedor']; ?></td>
<td><div align="center">
<input type="checkbox" name="seleccion[]" value="<?php echo $row_listaringreso['Id']; ?>" />
</div></td>
</tr>
</table>
<p>
<label for="eliminar"></label>
<input type="submit" name="eliminar" id="eliminar" value="Borrar" />
</p>
</form>
</body>
</html>
<?php
?>
Esperando ansiosamente el siguiente paso.
Muchas gracias por tu tiempo.