Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/07/2012, 11:35
desoler
 
Fecha de Ingreso: agosto-2008
Ubicación: Miami, FL
Mensajes: 210
Antigüedad: 15 años, 8 meses
Puntos: 2
Pregunta seleccion erronea de dato

Hola gente,

tengo este codigo:

Código PHP:
Ver original
  1. echo "
  2.                        <form name='f1' action='send_estimate.php' method='POST' >
  3.                          <table class='css3' id='mytable' cellspacing='0'>
  4.                          <tr class='nobg'>
  5.                            <th scope='col' width='60'><strong>Date</strong</th>
  6.                            <th scope='col' width='80'><strong>User</strong</th>
  7.                            <th scope='col' width='60'><strong>Pick Up</strong></th>
  8.                            <th scope='col' width='60'><strong>Drop Off</strong></th>
  9.                            <th scope='col' width='40'><strong>Map</strong></th>
  10.                            <th scope='col' width='100'><strong>Description</strong></th>
  11.                            <th scope='col' width='50'><strong>Estimate</strong></th>
  12.                            <th scope='col' width='50'><strong><a href=\"javascript:document.forms.f1.action='delete_main.php';document.forms.f1.submit();\">delete</a></strong></th>
  13.                            <th scope='col' width='25'><strong></strong></th>
  14.                          </tr>
  15.                        ";
  16.  
  17.                         while ($fila = mysql_fetch_array($datos_sql))
  18.                         {
  19.                         echo"
  20.                        <tr class='spec' >
  21.                        <td align=center width=60>".$fila['date']."</td>
  22.                        <td align=center width=80>".$fila['user_name']."</td>
  23.                        <td align=center width=60>".$fila['pickup_zip_code']."</td>
  24.                        <td align=center width=60>".$fila['dropoff_zip_code']."</td>
  25.                        <td align=center width=40><a href=\"javascript:popup('mapa.php?pickup_zip_code=".$fila['pickup_zip_code']."&dropoff_zip_code=".$fila['dropoff_zip_code']."',800,600)\" >Map</a></td>
  26.                        <td align=center width=150>".$fila['description']."</td>
  27.                        <td align=center width=50><input type='text' name='quote' value='".$fila['quote']."' size='10'></td>
  28.                        <td align=center width=50><input type='checkbox' name='select[]' value='".$fila['id_data']."'></td>
  29.                        <td align=center width=25><button type='submit' name='login_submit'>Submit</button></td>
  30.                        </tr>
  31.                        <input type='hidden' name='id_data' value='".$fila['id_data']."'>
  32.                        <input type='hidden' name='notification' value='Quote Received'>
  33.                      
  34.                        ";
  35.                         }
  36.                         echo "</table></form>";

Se hace un consulta a la BD y devuelve los valores en un listado.
Tengo unos select que me permiten seleccionar uno de los registros listados y borrarlo.
Al final tengo un boton submit que envia el action="send_estimate.php" dependiendo del resultado que seleccione.
Cuando tengo un solo resultado de la consulta funciona bien, pero cuando tengo mas de uno y presiono "submit" me envia los datos del ultimo registro y no del registro que presione submit, no se si me explico.

A ver si alguien me da una idea del fallo por que yo lo veo todo bien..

Gracias por el tiempo prestado
__________________
Se invierte mas dinero en cirugía de pechos y viagra que en la cura del Alzheimer. En unos años tendremos viejas con grandes tetas y viejos con erecciones pero que no recordarán para que sirven..