<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
<?php
$user="localhost";
$username="root";
$pass="";
$db="surti_office";
$conexion=mysqli_connect($user,$username,$pass,$db)or die ("ERROR DE CONEXION");
?>
<?php
$consultar="SELECT * FROM producto where total_oferta_iva >1 ORDER by idproducto desc limit 20";
$resultado=$conexion->query($consultar);
while ($resultados=$resultado->fetch_assoc()){
?>
<form action="#" id="formulario">
<input type="text" id="input" name="<?php echo $resultados['idproducto']?>" value="<?php echo $resultados['idproducto']?>">
<input type="submit" value="Enviar" />
</form>
<?php }?>
<script type="text/javascript">
$(document).ready(function(){
$("#formulario").submit(function(){
var cadena="";
cadena = $(this).serialize();
alert(cadena);
return false;
});
});
</script>