Frutas"; $c=0; $query = "select * from frutas where estado=0 order by destacada desc, fruta"; $result = mysql_query($query) or die("Error en el Query : " . mysql_error()); $num_rows = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { extract($row); if($c==4){ $c=1; }else{ $c++; } echo ""; } $dif=4-$c; for($i=1; $i<=$dif; $i++){ echo "

 

"; } }else{ if($_GET['id_fruta']>0){ echo "

Frutas

"; $id=$_GET['id']; $query = "select * from frutas where id_fruta='$id_fruta'"; $result = mysql_query($query) or die("Error en el Query : " . mysql_error()); $num_rows = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { extract($row); echo ""; echo "

$fruta

$descripcion
"; } } } echo "
"; if($_GET['id_fruta']=='' and $_GET['id_verdura']==''){ echo "

Verduras

"; $c=0; $query = "select * from verduras where estado=0 order by destacada desc, verdura"; $result = mysql_query($query) or die("Error en el Query : " . mysql_error()); $num_rows = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { extract($row); if($c==4){ $c=1; }else{ $c++; } echo ""; } $dif=4-$c; for($i=1; $i<=$dif; $i++){ echo "

 

"; } }else{ if($_GET['id_verdura']>0){ echo "

Verduras

"; $id_verdura=$_GET['id_verdura']; $query = "select * from verduras where id_verdura='$id_verdura'"; $result = mysql_query($query) or die("Error en el Query : " . mysql_error()); $num_rows = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { extract($row); echo ""; echo "

$verdura

$descripcion
"; } } } ?>