Ver Mensaje Individual
  #13 (permalink)  
Antiguo 03/08/2012, 07:57
Avatar de Nemutagk
Nemutagk
Colaborador
 
Fecha de Ingreso: marzo-2004
Ubicación: México
Mensajes: 2.633
Antigüedad: 20 años, 1 mes
Puntos: 406
Respuesta: subir imagenes php

o.O te falta en el form el 'enctype="multipar/form-data"', por eso no sube el archivo...

Código PHP:
Ver original
  1. <?php
  2. include_once( dirname(dirname(__FILE__)) . '/classes/check.class.php');
  3. protect("1");
  4.  
  5. if(empty($_POST))
  6.     include_once('header.php');
  7.    
  8.     if(empty($_POST))
  9.     include_once('conect.php');
  10.  
  11. ?>
  12. <div class="container-fluid">
  13.   <div class="row-fluid">
  14.     <div class="span2">
  15.     <?php include('sidebarevent.php'); ?>
  16.     </div>
  17.     <div class="span10">
  18.     <h1> Añadir Nuevo Evento </h1>
  19.    
  20.     <form action="./add2.php" method="post" name="NewEvent" enctype="multipart/form-data">
  21.       <p>
  22.         <input name="username" type="hidden" id="username" value="<?php echo $_SESSION['jigowatt']['username']; ?>" />
  23.       </p>
  24.       <p>
  25.         <label for="artista">Artista</label>
  26.         <input type="text" name="artista" id="artista" />
  27.         <br />
  28.         <label for="fecha">Fecha</label>
  29.         <input type="text" name="fecha" id="fecha" />
  30.         <br />
  31.         <label for="hora">Hora</label>
  32.         <input type="text" name="hora" id="hora" />
  33.         <br />
  34.         <label for="sala">Sala</label>
  35.         <input type="text" name="sala" id="sala" />
  36.         <br />
  37.         <label for="direccion">Direccion</label>
  38.         <input type="text" name="direccion" id="direccion" />
  39.         <br />
  40.          <label for="localidad">Localidad</label>
  41.         <input type="text" name="localidad" id="localidad" />
  42.         <br />
  43.        
  44.         <label for="provincia">Provincia</label>
  45.         <input type="text" name="provincia" id="provincia" />
  46.         <br />
  47.        
  48.         <label for="pais">País</label>
  49.         <input type="text" name="pais" id="pais" />
  50.         <br />Imagen <input type="file" name="txtarchivo" />Solo Jpg
  51.         <input name="valor" type="hidden" id="valor" value="0" />
  52.       </p>
  53.       <p>
  54.         <input type="submit" name="enviar" id="enviar" value="Enviar" />
  55.         <input type="reset" name="button" id="button" value="Restablecer" />
  56.       </p>
  57.     </form>
  58.    
  59.    
  60.  
  61.     </div>
  62.   </div>
  63. </div>
  64.  
  65. <?php include_once('footer.php'); ?>
__________________
Listo?, tendría que tener 60 puntos menos de IQ para considerarme listo!!!
-- Sheldon Cooper
http://twitter.com/nemutagk
PD: No contestaré temas vía mensaje personal =)