Ver Mensaje Individual
  #9 (permalink)  
Antiguo 23/10/2013, 10:38
jegggf
 
Fecha de Ingreso: septiembre-2012
Ubicación: montevideo
Mensajes: 131
Antigüedad: 11 años, 7 meses
Puntos: 0
Respuesta: inconveniente con formulario php mysql

que tal? probe con esto que me mandaste, echo '<select name="lugares[]">'; y me da el siguiente error:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/content/p/i/3/pi31416fxb4/html/juanmegasoft/0pf/asignacion/formularioasignacion.php on line 32

tambien probe sacandole el parentesis recto y me da el mismo error.
me resulta muy extraño.


Código PHP:
Ver original
  1. <html>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es">
  4.  <head>
  5.  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  6.  
  7.  
  8.  
  9.   <title> prueba3 </title>
  10.  </head>
  11.  
  12.  
  13.   <body>
  14.  
  15.     <p align=center>Asignacion</p>
  16.    
  17.     <br><br>
  18.    
  19.    
  20.     <form method="post" action="adjudicar3.php" name= "formulario" >
  21.     <p> objetos   lugares </p>
  22. <?php
  23.  
  24. include("conecta.php");
  25.  
  26.  global $db_selected;
  27.  global $db;
  28.  //$usertable = 'prueba1';
  29.  
  30. $result = mysql_query("SELECT objetos FROM prueba1", $db);
  31.  
  32. echo "<select name="objetos[]"> \n";
  33.  
  34. while ($row = mysql_fetch_row($result)){
  35.        echo "<option>$row[0]</option> ";
  36. }
  37. echo "</select> \n";
  38.  
  39.   $result1 = mysql_query("SELECT lugares FROM prueba2", $db);
  40.  
  41. echo "<select name="lugares[]"> \n";
  42.  
  43. while ($row = mysql_fetch_row($result1)){
  44.        echo "<option>$row[0]</option> ";
  45. }
  46. echo "</select> \n";  
  47.      
  48. ?>    
  49.     <input type="submit" value="insertar"> <br><br>  
  50.     </form>
  51.  
  52.    
  53.     <form method="post" action="buscar3.php" name= "formulariobuscar" >
  54.    
  55.      Buscar:<input type="text" name="busca"> <br><br>
  56.      
  57.      <input type="submit" value="buscar"> <br><br>
  58.        
  59.     </form>
  60.  
  61.   <a href = "http://www.fxb4.com/juanmegasoft/0pf/lugares/formulariolugares.php">modificar lugares y capacidad</a>
  62.  
  63.   <br><br>
  64.  
  65.   </body>
  66. </html>