Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tacopnet/public_html/pdf/consu.php on line 26
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/tacopnet/public_html/pdf/consu.php on line 34
Warning: Invalid argument supplied for foreach() in /home/tacopnet/public_html/pdf/consu.php on line 43
este es el codigo:
Código PHP:
$conec=mysql_connect("10.33.143.3","tacopnet_root","y+y-u*u/");
$b=$_POST['caja1'];
$result=mysql_db_query("tacopnet_tacop","select * from imagenes inner join finiquito on imagenes.id=finiquito.id where id LIKE '%{$b}%' ",$conec);
//Mostramos los registros
$contador=0;
while ($row=mysql_fetch_assoc($result))
{
echo '".$row["A35"]."';
echo '<img src="'.$row['ruta'].'" width="30%" height="30%">';
echo '</img>';
$ids[$contador]=$row['id'];
$contador++;
}
mysql_free_result($result);
mysql_close($conec);
?>
<?
echo "<FORM method='post' action='reportepdf.php'>";
echo "<input type='submit' name='submit' value='Obtener Pdf'>";
foreach ( $ids as $idimg)
{
echo "<input type='text' name='ruta[]' value='$idimg' />"; //aca genero tantos hidden como imagenes haya
echo "</FORM>";
}
?>
saludos y gracias