Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/02/2012, 15:07
Avatar de moronino
moronino
 
Fecha de Ingreso: marzo-2010
Mensajes: 55
Antigüedad: 14 años, 1 mes
Puntos: 0
Respuesta: error in your SQL syntax

ok, puede ser eso. El codigo que tengo para pasar la variable id es este:

Código PHP:
Ver original
  1. $sql = "SELECT nb, pobla FROM restaurante order by id";
  2. $result=mysql_query($sql,$link)or die (mysql_error()); 
  3. while (($row=mysql_fetch_array($result)))
  4. {                          
  5. ?>
Código HTML:
Ver original
  1. table width="629">
  2.    <tr>
  3.       <td width="241" >
  4.           <p>· <? echo ($row["nb"]); ?></p>
  5.       </td>
  6.       <td width="210" ><p><? echo ($row["pobla"]); ?><p></td>
  7.       <td width="80">                      
  8.           <form action="editarrestaurante.php" method="post" name="form1">
  9.            <input name="id" type="hidden" id="id" value="<? echo ($row["id"]); ?>">
  10.            <input type="submit" name="Submit23" value="Editar">
  11.          </form>
  12.       </td>        
  13.       <td width="78">                                      
  14.          <form action="eliminarrestaurante.php" method="post" name="form2">
  15.           <input name="id" type="hidden" id="id" value="<? echo ($row["id"]); ?>[" />
  16.           <input type="submit" name="Submit22" value="Eliminar" onclick="return aceptar()"; />
  17.          </form>
  18.       </td>
  19.       </tr>
  20.    </table>
Código PHP:
Ver original
  1. <?             
  2. }
  3. ?>

Por mas que miro nose donde esta el fallo.