Tema: select
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/11/2013, 07:31
Avatar de xSkArx
xSkArx
 
Fecha de Ingreso: marzo-2008
Ubicación: Chile
Mensajes: 945
Antigüedad: 16 años, 2 meses
Puntos: 96
Respuesta: select

Código PHP:
Ver original
  1. <?php
  2. include ("conecta.php");
  3.  
  4.     function adjudicar($objeto,$lugar)
  5.     {
  6.    
  7.         global $db_selected;
  8.         global $db;
  9.        
  10.         $objetos   = mysql_real_escape_string($objeto,$db);
  11.         $lugares   = mysql_real_escape_string($lugar,$db);
  12.        
  13.         if ($objetos != "" &&  $lugares != "")  
  14.         {
  15.          
  16.          $query  = "INSERT INTO prueba3 (objetos,lugares) " . "VALUES ('$objetos','$lugares')";
  17.            
  18.          $result = mysql_query($query,$db);
  19.        
  20.             //echo "$result";
  21.             echo "lugar adjudicado<br><br>";
  22.             echo "<a href = 'http://www.fxb4.com/juanmegasoft/0pf/formulario.php''> Volver al menu </a>";
  23.            
  24.         }
  25.        else
  26.         {
  27.          echo "rellena  los dos campos<br><br>";
  28.          echo "<a href = 'http://www.fxb4.com/juanmegasoft/0pf/formulario.php'> Volver al menu </a>";
  29.         }
  30.            
  31.        
  32.     }
  33.     adjudicar($_POST['objetos'],$_POST['lugares']);
Tu problema estaba en la funcion no rn el select