Ver Mensaje Individual
  #11 (permalink)  
Antiguo 30/05/2006, 18:30
patriciadedo
 
Fecha de Ingreso: marzo-2006
Mensajes: 86
Antigüedad: 18 años, 1 mes
Puntos: 0
no lo encuentro....perdon por la ignorancia.....buahhh

paso el codigo, que se yo donde puede estar el error...
hay comentarios de lo que fui poneindo y sacando...
Please si alguien puede mrarlo....

Código:
<?php 
		
	if($enviar){

		conectarse();
		$fecha_larga=getdate();
//		printf("Puede Fácilmente intercalar <b> %s </b> con número <b> %.2f </b> <br>",$var,$num); 
		
		$fecha = sprintf("%s/%s/%s", $fecha_larga['year'],$fecha_larga['mon'],$fecha_larga['mday']);
		
		//$posicion = (strrpos ($imagen,'\\') + 1);
		//$imagen = substr($imagen,$posicion);
		//$imagen2 = substr($imagen2,$posicion);
		//$imagen3 = substr($imagen3,$posicion);
		//$imagen4 = substr($imagen4,$posicion);
		//$imagen5 = substr($imagen5,$posicion);
		
		$directorio="imagenes/noticias/";
		copy($imagen, $directorio.$imagen_name);
		$archivo=$imagen_name;
		unlink($imagen);
				
		$sql = "INSERT INTO noti (notiide, notifec, notisec, notiaut, notivol, notitit, notisub, noticop, notides, notiima, notiim2, notiim3, notiim4, notiim5)";
		$sql .= " VALUES ('null','$fecha','$cod_seccion','$autor','$volanta','$titulo','$subtitulo','$copete','$desarrollo','$archivo', '$imagen2','$imagen3','$imagen4','$imagen5')";
		$result = mysql_query($sql);
		
		if (file_exists($archivo)){	
		//if (mysql_errno()) {
			//echo mysql_errno().": ".mysql_error()."<br>";
			//}
		//else {
		echo "El archivo" .$archivo. "ha sido subido exitosamente";
			 echo "Datos Actualizados.\n";
		     echo "<a href=consulta_noticias.php><b>CONSULTA NOTICIAS</b></a>";
			 }
	 else {
	 echo "ERROR al procesar el archivo"; 
	 echo "path  " .$directorio.$archivo. "<br>";
	 echo $imagen;}	
		
	}else{
	?>
      </p>
      <H1 align="center"> <font size="4"><em>CARGA DE NOTICIAS</em></font></H1>
      <Form  method="Post" action="alta_noticias.php" enctype="multipart/form-data">
        <table width="81%" border="0" align="left">
          <tr> 
            <td width="12%" height="31" valign="top"><font size="3">Secci&oacute;n:</font></td>
            <td width="37%"><select name="cod_seccion" size="1" id="select3">
                <?php
				conectarse();
				$result_secc = mysql_query ("select * from secc order by seccdes");
     		 	 while($myrow = mysql_fetch_array($result_secc))
				{
			 		echo "<option value=" . $myrow[seccide] . ">" .$myrow[seccdes] . "</option>";
				}	
			?>
              </select></td>
            <td width="8%">Autor:</td>
            <td width="43%"><select name="autor" size="1" id="select4">
                <?php
  				conectarse();
	     		 $result_aut = mysql_query("select * from auto order by autonom");
			 	 while($myrow = mysql_fetch_array($result_aut))
				{
			 		echo "<option value=" . $myrow[autoide] . ">" . $myrow[autonom] . "</option>";
				}	
			?>
              </select></td>
          </tr>
          <tr> 
            <td valign="top"><font size="3">Volanta:</font></td>
            <td colspan="3"><textarea name="volanta" cols="70" id="textarea5"></textarea></td>
          </tr>
          <tr> 
            <td valign="top"><font size="3">T&iacute;tulo: </font></td>
            <td colspan="3"><textarea name="titulo" cols="70" id="textarea6"></textarea></td>
          </tr>
          <tr> 
            <td valign="top"><font size="3">Subt&iacute;tulo: </font></td>
            <td colspan="3"><textarea name="subtitulo" cols="70" id="textarea7"></textarea></td>
          </tr>
          <tr> 
            <td valign="top"><font size="3">Copete: </font></td>
            <td colspan="3"><textarea name="copete" cols="70" id="textarea8"></textarea></td>
          </tr>
          <tr> 
            <td valign="top"><font size="3">Desarrollo: </font></td>
            <td colspan="3"><textarea name="desarrollo" cols="70" rows="7" id="textarea9"></textarea></td>
          </tr>
          <tr> 
            <td valign="top">Imagen1:</td>
            <td colspan="3"><input name="imagen" type="file" id="imagen" value="" size="32" maxlength="100"></td>
          </tr>
          <tr> 
            <td valign="top">Imagen2:</td>
            <td colspan="3"><input name="imagen2" type="file" id="imagen2" value="" size="32" maxlength="100"></td>
          </tr>
          <tr> 
            <td valign="top">Imagen3:</td>
            <td colspan="3"><input name="imagen3" type="file" id="imagen3" value="" size="32" maxlength="100"></td>
          </tr>
          <tr> 
            <td valign="top">Imagen4:</td>
            <td colspan="3"><input name="imagen4" type="file" id="imagen4" value="" size="32" maxlength="100"></td>
          </tr>
          <tr> 
            <td valign="top">Imagen5:</td>
            <td colspan="3"><input name="imagen5" type="file" id="imagen5" value="" size="32" maxlength="100"></td>
          </tr>
          <tr> 
            <td valign="top">&nbsp;</td>
            <td colspan="3"><input type="submit" value="Alta Noticia" name="enviar"> 
              <?php }
	?>
            </td>
          </tr>
        </table>
      </Form></td>
  </tr>
</table>
__________________
:stress: Patri:corazon: