Ver Mensaje Individual
  #11 (permalink)  
Antiguo 27/06/2011, 16:06
darkfire65
 
Fecha de Ingreso: marzo-2011
Mensajes: 10
Antigüedad: 14 años
Puntos: 0
Respuesta: Tengo un problema con la paginacion

oye una pregunta tu sabes si esto esta guardando bien .. osea el if esta actuando como deberia actuar??

Código PHP:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6. </head>
  7.  
  8. <body>
  9.  
  10. <p>
  11. <?php
  12.   require_once('configuration.php');
  13.   include ("conex.php");
  14.   $link = Conectarse();
  15.   $Tipo = $_POST['Tipo'];
  16.   $Autor = $_POST['Autor'];
  17.   $Titulo = $_POST['Titulo'];
  18.   $Logo = $_FILES['Logo']['name']; // Nombre del archivo
  19.   $Descripcion = $_POST['Descripcion'];
  20.   $carpeta = './Logos'; // Ruta donde guardaremos el archivo subido
  21.   $id= $_POST['id'];
  22.  
  23.  
  24.  echo $Tipo;
  25.  
  26.  if($Tipo='Empresas de Segurida')
  27.  {  
  28.    if ($Logo)
  29.        {
  30.          if(move_uploaded_file($_FILES['Logo']['tmp_name'],$carpeta.'/'.$Logo))
  31.            {
  32.              $sql = mysql_query("INSERT INTO ofertas_seguridad (Autor,Titulo,Descripcion,TipoEmpresa, Imagen, id_usuario) VALUES ('$Autor','$Titulo','$Descripcion','$Tipo','$Logo', '$id');",$link);
  33.         }
  34.     }        
  35.     }
  36.     elseif($Tipo='Empresas de Dotacion')
  37.     {
  38.     if ($Logo)
  39.        {
  40.          if(move_uploaded_file($_FILES['Logo']['tmp_name'],$carpeta.'/'.$Logo))
  41.            {
  42.              $sql1 = mysql_query("INSERT INTO ofertas_dotacion (Autor,Titulo,Descripcion,TipoEmpresa, Imagen, id_usuario) VALUES ('$Autor','$Titulo','$Descripcion','$Tipo','$Logo', '$id');",$link);
  43.         }
  44.     }  
  45.     }
  46.     elseif($Tipo='Escuelas de Capacitacion')
  47.    
  48.     {
  49.     if ($Logo)
  50.        {
  51.          if(move_uploaded_file($_FILES['Logo']['tmp_name'],$carpeta.'/'.$Logo))
  52.            {
  53.              $sql2 = mysql_query("INSERT INTO ofertas_escuelas (Autor,Titulo,Descripcion,TipoEmpresa, Imagen, id_usuario) VALUES ('$Autor','$Titulo','$Descripcion','$Tipo','$Logo', '$id');",$link);
  54.         }
  55.     }  
  56.     }
  57.    
  58. ?>
  59. <br />
  60. </p>
  61. <form id="form1" name="form1" method="post" action="oferta.php">
  62.   <div align="center">
  63.     <p>Oferta Registrada</p>
  64.     <p>
  65.       <label>
  66.         <input type="submit" name="button" id="button" value="Continuar" />
  67.       </label>
  68.     </p>
  69.   </div>
  70. </form>
  71.   </div>
  72. </form>
  73.  
  74. </p>
  75. <p>&nbsp;</p>
  76. </body>
  77. </html>