Y si realizas algo parecido a esto:
Código PHP:
<?php
$db = mysql_pconnect ( "xxxx", "xxxx", "xxxx" );
mysql_select_db ( 'xxxx' );
$consulta = "SELECT * FROM tblArticulos WHERE id_index IN ( $id2 )";
$result = mysql_query ( $consulta );
$numeroderesult = mysql_num_rows ( $result );
if ($numeroderesult > 0)
{
while ( $fila = mysql_fetch_array ( $result ) )
{
if ( isset ( $_POST['submit' ] ) )
{
echo "ID de artículo: ".$fila['id_index']."<br/>";
echo "Precio de artículo: ".$fila['precio']."<br/>";
echo "Cantidad de cuotas: ".$fila['cuotas']."<br/>";
echo "Total: ".$_POST['cantidad']*$fila['precio']."<p>";
}
else
{
echo "<form name = \"formu\" action = '".$_SERVER['PHP_SELFT']."' method = \"POST\">";
echo "ID de artículo: ".$fila['id_index']."<br/>";
echo "Precio de artículo: ".$fila['precio']."<br/>";
echo "Cantidad de cuotas: ".$fila['cuotas']."<br/>";
echo "Cantidad: <input type='text' name='cantidad' class='formulario' maxlength='30' value='1'><br/>";
echo "Total: ".$fila['cuotas']*$fila['precio']."<p>";
echo "<input type = \"submit\" name = \"submit\" value = \"Actualizar\">";
echo "</form>";
}
}
}
else
{
echo "No hay resultados";
}
?>
Hojala si te funcione. Suerte