<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://php.apsique.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Php y otras yerbas - Php para dummies - Comentarios</title>
 <link>http://php.apsique.com/lenguajes/php/dummies</link>
 <description>Comentarios para &quot;Php para dummies&quot;</description>
 <language>es</language>
<item>
 <title>COMO TOMAR EL NOMBRE DE UN</title>
 <link>http://php.apsique.com/contenido/borrar_multiples_registros_con_checkbox#comment-82891</link>
 <description>&lt;p&gt;COMO TOMAR EL NOMBRE DE UN CHECKBOX Y COLOCARLO DENTRO DE UN TEXTBOX PARA QUE AL DAR CLICK EN UN BOTON DE MOSTRAR ME DE EL REPOTE DE ESE CHECKBOX SELECCINADO!&lt;br /&gt;
(ES QUE CADA CHECKBOX ES UN DEPTO)&lt;/p&gt;
&lt;p&gt;SI ALGUIEN ME PUEDE AYUDAR@@!!&lt;br /&gt;
POR FAVOR ME URGE!&lt;/p&gt;
</description>
 <pubDate>Mon, 14 Jul 2008 14:06:21 -0700</pubDate>
 <dc:creator>LIZZY</dc:creator>
 <guid isPermaLink="false">comment 82891 at http://php.apsique.com</guid>
</item>
<item>
 <title>Sería bueno que pusieses</title>
 <link>http://php.apsique.com/contenido/borrar_multiples_registros_con_checkbox#comment-82804</link>
 <description>&lt;p&gt;Sería bueno que pusieses algo del código, encerrado dentro de tags &quot;code&quot;. No te preocupes si no sale de inmediato; al verlo, autorizo su representación.&lt;/p&gt;
</description>
 <pubDate>Thu, 10 Jul 2008 08:12:39 -0700</pubDate>
 <dc:creator>clbustos</dc:creator>
 <guid isPermaLink="false">comment 82804 at http://php.apsique.com</guid>
</item>
<item>
 <title>Estoy necesitando realizar</title>
 <link>http://php.apsique.com/contenido/borrar_multiples_registros_con_checkbox#comment-82802</link>
 <description>&lt;p&gt;Estoy necesitando realizar un formulario con varios pasos.&lt;br /&gt;
* Primero debe realizar una consulta SELECT (para traer ciertos valores);&lt;br /&gt;
* Segundo deben aparecer los checkbox pertenecientes a cada valor devuelto por la primera consulta (hasta acá anda bien);&lt;br /&gt;
* Tercero se debe especificar qué campo de la base de datos actualizar y con qué valor (correspondientes a los registros seleccionados previamente);&lt;br /&gt;
* Cuarto se debe realizar el UPDATE de los datos seleccionados en los checkbox.&lt;/p&gt;
&lt;p&gt;El tema sé si hacerlo en varios formularios o en uno solo. (la verdad dejé hace como 1 año de programar en PHP así que estoy algo &quot;oxidado&quot;).&lt;/p&gt;
&lt;p&gt;Desde ya agradezco toda ayuda.&lt;/p&gt;
&lt;p&gt;PD: Si necesitan que postee parte del código que tengo no hay ningún problema.&lt;/p&gt;
</description>
 <pubDate>Thu, 10 Jul 2008 05:07:35 -0700</pubDate>
 <dc:creator>Hardstone</dc:creator>
 <guid isPermaLink="false">comment 82802 at http://php.apsique.com</guid>
</item>
<item>
 <title>hola  te mando  un  saludo</title>
 <link>http://php.apsique.com/contenido/sesiones_basico#comment-82624</link>
 <description>&lt;p&gt;hola  te mando  un  saludo  tengo  una pregunta  para  ti  , lo que  pasa es  que  manejo una  sesion  en mi  sitio  para que  puedan  ingresar  mis  usuarios (estos  estan dados  de  alta  en una  base de  datos) al  sitio ,y  estos pueden dar  de alta registros  en  un  formulario  y asignar actividades  y todo  se  guardan en una base  de  datos  pero no  el  usuario  que las  da  de  alta ,y  queria  saber  como le puedo  hacer  para  que  este  usurio  quede  registrado  a la  hora  de  te da  alta  una  actividad y los registros, se  olvidaba mencionarte  a la  hora de  ingresa  el usuario  a la  pagina  principal  aparece  su  nombre en la  parte  de  arriba ,pero  empeze  a  tratar  de  utilizar un campo hidden  para  hacer  esta  accion , pero  no es  posible  de hacer  o mas  bien no se como  hacer  esto .&lt;/p&gt;
&lt;p&gt; &amp;lt;?php&lt;br /&gt;
  $_SESSION[&quot;nombre&quot;]; es  como lo estoy manejando&lt;br /&gt;
  ?&amp;gt;&lt;/p&gt;
&lt;p&gt;Espero  me  puedas  orientar como resolver este  problema .&lt;/p&gt;
&lt;p&gt;Saludos&lt;/p&gt;
</description>
 <pubDate>Wed, 02 Jul 2008 14:47:01 -0700</pubDate>
 <dc:creator>Eliel </dc:creator>
 <guid isPermaLink="false">comment 82624 at http://php.apsique.com</guid>
</item>
<item>
 <title>Excelente solución muy</title>
 <link>http://php.apsique.com/contenido/borrar_multiples_registros_con_checkbox#comment-82326</link>
 <description>&lt;p&gt;Excelente solución muy simple y práctica.&lt;/p&gt;
&lt;p&gt;Genial&lt;/p&gt;
&lt;p&gt;Saludos.&lt;/p&gt;
</description>
 <pubDate>Tue, 24 Jun 2008 15:19:02 -0700</pubDate>
 <dc:creator>Gastón</dc:creator>
 <guid isPermaLink="false">comment 82326 at http://php.apsique.com</guid>
</item>
<item>
 <title>hola :&#039;( una vez use este</title>
 <link>http://php.apsique.com/contenido/borrar_multiples_registros_con_checkbox#comment-82324</link>
 <description>&lt;p&gt;hola :&#039;( una vez use este codigo que prorporcionan en esta pagina y si me sirvio pero ahora no se que le movi o que paso que me manda el siguiente error:&lt;/p&gt;
&lt;p&gt;Warning: Invalid argument supplied for foreach() in&lt;/p&gt;
&lt;p&gt;y mi codigo lo tengo asi:&lt;br /&gt;
en el html:&lt;/p&gt;
&lt;p&gt;en el php esta asi&lt;/p&gt;
&lt;p&gt;&amp;lt;?php&lt;br /&gt;
   include(conexion.php);&lt;br /&gt;
   if(!empty($_POST[campos]))&lt;br /&gt;
   {&lt;br /&gt;
     $aList=array_keys($_POST[campos]);&lt;br /&gt;
   {&lt;br /&gt;
   foreach($aList as $iId)&lt;br /&gt;
   {&lt;br /&gt;
    $borrar=mysql(&quot;delete from producto where id=$iId&quot;,$conec);&lt;br /&gt;
   }&lt;br /&gt;
?&amp;gt;&lt;/p&gt;
&lt;p&gt;Alguien me puede decir porque me marca ese error yo no se lo encuentro porfis&lt;/p&gt;
</description>
 <pubDate>Tue, 24 Jun 2008 10:15:05 -0700</pubDate>
 <dc:creator>Estrella</dc:creator>
 <guid isPermaLink="false">comment 82324 at http://php.apsique.com</guid>
</item>
<item>
 <title>Hola disculpen, ya he</title>
 <link>http://php.apsique.com/contenido/borrar_multiples_registros_con_checkbox#comment-82299</link>
 <description>&lt;p&gt;Hola disculpen, ya he probado este codigo antes y si me ha servido muy bien, pero ahora necesito algo un tanto diferente, tengo que realizar una agenda de eventos y marcarlos como destacados, aprobados, etc.. y me han pedido que funcione mas o menos como el gmail, es decir con la estrellita para marcar los destacados con solo hacer click sobre ella, me gustaria que alguien me orientada sobre como es que lo debo hacer, gracias @_@&lt;/p&gt;
</description>
 <pubDate>Mon, 23 Jun 2008 00:12:55 -0700</pubDate>
 <dc:creator>amegari</dc:creator>
 <guid isPermaLink="false">comment 82299 at http://php.apsique.com</guid>
</item>
<item>
 <title>Hola a todos como paso el</title>
 <link>http://php.apsique.com/contenido/borrar_multiples_registros_con_checkbox#comment-82047</link>
 <description>&lt;p&gt;Hola a todos como paso el contenido mediante javascript de un array de checkbox, lo que pasa es que estoy haciendo algo con javascript y solo me pasa el valor de uno de los check que estaba marcado.&lt;/p&gt;
&lt;p&gt;Saludos&lt;/p&gt;
</description>
 <pubDate>Fri, 13 Jun 2008 14:30:44 -0700</pubDate>
 <dc:creator>Claudio</dc:creator>
 <guid isPermaLink="false">comment 82047 at http://php.apsique.com</guid>
</item>
<item>
 <title>Estimado, excelente.. justo</title>
 <link>http://php.apsique.com/contenido/borrar_multiples_registros_con_checkbox#comment-81653</link>
 <description>&lt;p&gt;Estimado, excelente.. justo lo que estaba buscando... Muchas gracias&lt;/p&gt;
</description>
 <pubDate>Thu, 29 May 2008 00:49:29 -0700</pubDate>
 <dc:creator>CarlosUnico</dc:creator>
 <guid isPermaLink="false">comment 81653 at http://php.apsique.com</guid>
</item>
<item>
 <title>no hay un video tutorial
del</title>
 <link>http://php.apsique.com/contenido/borrar_multiples_registros_con_checkbox#comment-81567</link>
 <description>&lt;p&gt;no hay un video tutorial&lt;br /&gt;
del caso,&lt;br /&gt;
por q para los q estan pollitos&lt;br /&gt;
hay problemas para implementarlo&lt;/p&gt;
&lt;p&gt;graciax&lt;/p&gt;
</description>
 <pubDate>Tue, 27 May 2008 13:57:28 -0700</pubDate>
 <dc:creator>Aaaaa</dc:creator>
 <guid isPermaLink="false">comment 81567 at http://php.apsique.com</guid>
</item>
<item>
 <title>Si quieres que las checbox</title>
 <link>http://php.apsique.com/contenido/borrar_multiples_registros_con_checkbox#comment-81555</link>
 <description>&lt;p&gt;Si quieres que las checbox estén accesibles desde javascript, has de añadir id=&quot;nombre_campo_sin_corchetes&quot;.&lt;/p&gt;
&lt;p&gt;Saludos&lt;/p&gt;
</description>
 <pubDate>Tue, 27 May 2008 04:13:07 -0700</pubDate>
 <dc:creator>Perejilillo desconocido</dc:creator>
 <guid isPermaLink="false">comment 81555 at http://php.apsique.com</guid>
</item>
<item>
 <title>EEEEEEEEEEEEEEEEEEEEEExcelent</title>
 <link>http://php.apsique.com/contenido/borrar_multiples_registros_con_checkbox#comment-81069</link>
 <description>EEEEEEEEEEEEEEEEEEEEEExcelente, de verdad muy muy bueno el código sencillo, si tanta validación, y super rápido.

Mi código quedó así
Usando ADODB
PHP del Form
&lt;div class=&#039;code&#039;&gt;&lt;div class=&quot;hl-main&quot;&gt;&lt;ol class=&quot;hl-main&quot;&gt;&lt;li&gt;&amp;nbsp;&lt;span class=&quot;hl-inlinetags&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;campos[&amp;lt;? echo &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$recordSetX&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;-&amp;gt;fields[0];?&amp;gt;]&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;? &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$recordSetX&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;-&amp;gt;fields[0]; echo &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;;?&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp; &lt;/li&gt;
&lt;li&gt;&amp;nbsp;PHP de acciones&lt;/li&gt;
&lt;li&gt;&amp;nbsp; &lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$db&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;=Conectar();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;                &lt;/li&gt;
&lt;li&gt;&amp;nbsp;if(!empty(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$_POST&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;[&#039;campos&#039;])) {&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$aLista&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$_POST&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;[&#039;campos&#039;];&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$sQuery&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;DELETE&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;FROM&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;ctg&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;where&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;IN&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;.implode(&#039;,&#039;,&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$aLista&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$result&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$db&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;-&amp;gt;Execute(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$sQuery&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    }&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    //print_r(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$sQuery&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    header(&#039;location: miembros.php?&#039;.SID.&#039;&amp;amp;usr=&#039;.&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$usr&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;.&#039;&amp;amp;memo=&#039;.&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$memo&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;.&#039;&amp;amp;opc=&#039;.&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$opc&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;?&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 13 May 2008 10:06:00 -0700</pubDate>
 <dc:creator>Oscar Alzate</dc:creator>
 <guid isPermaLink="false">comment 81069 at http://php.apsique.com</guid>
</item>
<item>
 <title>Necesito borrar el mismo id</title>
 <link>http://php.apsique.com/contenido/borrar_multiples_registros_con_checkbox#comment-80937</link>
 <description>&lt;p&gt;Necesito borrar el mismo id en dos tablas a la vez ya que están relacionadas, pero intente de la siguiente forma sin tener exito:&lt;/p&gt;
&lt;p&gt;$Lista=array_keys($_POST[&#039;campos&#039;]);&lt;br /&gt;
echo $sql=&quot;DELETE FROM app a, app_link l WHERE a.id_app IN (&quot;.implode(&#039;,&#039;,$Lista).&quot;) AND l.id_app IN (&quot;.implode(&#039;,&#039;,$Lista).&quot;)&quot;;&lt;br /&gt;
mysql_query($sql);&lt;/p&gt;
&lt;p&gt;igual probe otras formas sin tener exito.... la idea es hacerlo en una misma consulta y no tener que hacer una consulta por cada id que vaya a borrar...&lt;/p&gt;
&lt;p&gt;agradezco a quien me pueda dar una idea.&lt;/p&gt;
&lt;p&gt;y gracias por este ejm, me ha sido de gran utilidad... muy simple y practico, gracias.&lt;/p&gt;
</description>
 <pubDate>Mon, 05 May 2008 10:44:53 -0700</pubDate>
 <dc:creator>jefmaus</dc:creator>
 <guid isPermaLink="false">comment 80937 at http://php.apsique.com</guid>
</item>
<item>
 <title>Pero si esa consulta es todo</title>
 <link>http://php.apsique.com/contenido/respuesta_comentario_sobre_php_hablemos_seguridad#comment-79639</link>
 <description>&lt;p&gt;Pero si esa consulta es todo un mostrario de COMO NO DEBE SER UNA CONSULTA&lt;/p&gt;
&lt;p&gt;Primero lo de la Inyeccion SQL&lt;br /&gt;
Segundo Validar Datos&lt;br /&gt;
Tercero Control de datos entrados&lt;/p&gt;
&lt;p&gt;que tal que el campo fecha espere aa/mm/dd y el dato vaya dd/mm/aa&lt;/p&gt;
&lt;p&gt;que tal si el medicamento DEBA existir, debe ser validado antes&lt;/p&gt;
&lt;p&gt;que tal que un campo este definido para maximo 16 letras ?? y se le pasen mas...&lt;/p&gt;
&lt;p&gt;etc... en fin Validar antes de Meterlo. Tal cual como el uso del Condon :)&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Apr 2008 09:25:19 -0700</pubDate>
 <dc:creator>Hely</dc:creator>
 <guid isPermaLink="false">comment 79639 at http://php.apsique.com</guid>
</item>
<item>
 <title>No te entendí :S</title>
 <link>http://php.apsique.com/contenido/borrar_multiples_registros_con_checkbox#comment-79570</link>
 <description>&lt;p&gt;No te entendí :S&lt;/p&gt;
</description>
 <pubDate>Tue, 01 Apr 2008 13:23:43 -0700</pubDate>
 <dc:creator>clbustos</dc:creator>
 <guid isPermaLink="false">comment 79570 at http://php.apsique.com</guid>
</item>
</channel>
</rss>
