onclick='this ();' o onSubmit='this ();' no conosco esos eventos y no se si estan correctos espero que me ayuden se los agradecere
Código PHP:
Ver original
<?php $link = $pag->conecta("nacional"); $autos_id[] = "4"; //Pointer $autos_id[] = "3"; //Chevy $autos_id[] = "31"; //Spark foreach($autos_id as $ind){ $sql = " SELECT *, vehiculos.id as idAuto, categorias.id as idCate FROM vehiculos INNER JOIN categorias ON vehiculos.categoria = categorias.nombre WHERE vehiculos.id = '$ind' "; $auto = $pag->_SQL($sql, "array", "nacional"); switch($auto['tipo']){ case 'economico': $class = 'auto_muestra2'; break; } echo "<li class='bg_gris'><div class='autos'><img src='".$auto['camino']."' /></div>"; echo "<div class='modelo'>".$auto['nombreAuto']."</div><div class='bt_carro'><input type='submit' value='' alt='".$auto['idAuto']."' onSubmit='this();'/></div></li>"; echo "<input type='hidden' value='".$auto['idAuto']."' alt='".$auto['idAuto']."' name='id_auto' id='id_auto' />"; echo "<input type='hidden' value='".$auto['categoria']."' name='categoria' />"; if($auto['idAuto'] == $autos_id[] = "4"){ } if($auto['idAuto'] == $autos_id[] = "3"){ } if($auto['idAuto'] == $autos_id[] = "31"){ } echo "<ul>"; $cont = 0; foreach($des as $indDes){ if($cont <= 3 and $indDes != "") echo "<p class='letraautos'>$indDes</p>"; $cont++; }echo "</ul>"; } ?>