Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/11/2012, 08:51
EduardoCh
 
Fecha de Ingreso: mayo-2009
Mensajes: 43
Antigüedad: 15 años
Puntos: 2
¿Porque no ejecuta la consulta?

¿Porque no ejecuta la consulta? ¿Veís algo mal?

Código PHP:
while ($row mysql_fetch_row($result))
{
echo 
"<form method= 'POST' action= 'index.php' name= '".$row[3]."' style= 'display: inline';>";
echo 
"<input type='hidden' value='".$row[3]."' name='del'>";
echo 
"</form>";
echo 
"<input type='text' style='display:inline; width:100px;' value='".$row[0]."' name='nombre'> ";
echo 
"<input type='text' style='display:inline; width:100px;' value='".$row[1]."' name='apellido1'> ";
echo 
"<input type='text' style='display:inline; width:100px;' value='".$row[2]."' name='apellido2'> ";
if ( 
$row[4] != "")
{
echo 
"<input type='text' style='display:inline;width:20px;' value='".$row[4]."' name='botella'> ";
}
echo 
"<input type='text' style='display:inline; width:100px;' value='".$row[5]."' name='Calendario'> ";
echo 
"<input type='text' style='display:inline; width:100px;' value='".$row[6]."' name='correo'> ";
echo 
"<a href='#' onclick=\"document.forms['".$row[3]."'].submit();\"> BORRAR</a>";
echo 
$_POST['del'];
if (
$_POST['del'] != "")
{
mysql_query("DELETE FROM listas WHERE carnet='".$_POST['del']."'") or die (mysql_error());
}
echo 
"<p>";