Ver Mensaje Individual
  #4 (permalink)  
Antiguo 10/10/2008, 13:21
Avatar de after
after
 
Fecha de Ingreso: junio-2006
Ubicación: De marte
Mensajes: 791
Antigüedad: 17 años, 11 meses
Puntos: 10
Respuesta: Duda con action en un form

usando un switch podría ser
Pagina.php:
Código php:
Ver original
  1. <?
  2. $id=$_GET['id'];
  3.  
  4. switch ($id) {
  5.  
  6.     case delete:
  7.    
  8.    $link = mysql_connect("localhost", "***", "****");
  9.     mysql_select_db("****", $link);
  10.    
  11.     if (isset($_POST['eliminar_seleccion']))
  12.         if (count($_POST['seleccion']))
  13.             foreach($_POST['seleccion'] as $id => $valor)
  14.                 mysql_query("DELETE FROM socios WHERE id = ".$id." LIMIT 1", $link);
  15.  
  16.        breack;
  17.  
  18. }
  19. ?>
  20. ......
  21.  <form action="pagina.php?id=delete" method="post">
  22.  
  23. .......

algo asi....
__________________
@ivancamiloGo