Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/03/2009, 05:41
jonis241288
 
Fecha de Ingreso: noviembre-2008
Mensajes: 10
Antigüedad: 15 años, 5 meses
Puntos: 0
Sistema de noticias

Hola devuelta muchachos, hace un par de dias subi un tema con el mismo titulo, me tiraron algunas ideas pero no hubo caso...sigue sin cargarme las variables...

aca les dejo script que quedo corregido pero que sigue sin funcionar...

Cargar_noticia.php
Código:
					  <form action="cargar_noticia2.php" method="post" class="Estilo1">
                      <p align="center">Titulo:</p>
                      <p align="center">
                        <label>
                        <input name="titulo" type="text" size="70" maxlength="255" />
                        </label>
                    </p>
                      <p align="center">Categoria:</p>
                      <p align="center">
                        <label>
                          <input name="categoria" type="text" size="70" maxlength="255" id="categoria" />
                        </label>
                      </p>
					  <p align="center">Autor:</p>
                      <p align="center">
                        <label>
                        <input name="autor" type="text" size="70" maxlength="255" />
                        </label>
                    </p>
                      <p align="center">&nbsp;</p>
                      <p align="center">Copete:</p>
                      <p align="center">
                        <label>
                        <textarea name="copete" cols="70" rows="4"></textarea>
                        </label>
                      </p>
                      <p align="center">&nbsp;</p>
                      <p align="center">Noticia:</p>
                      <p align="center">
                        <label></label>
                        <textarea name="noticia" cols="70" rows="10"></textarea>
                      </p>
                      <p align="center">&nbsp;</p>
                      <p align="center">
                        <label>
                        <input type="submit" name="Submit" value="Cargar" />
                        </label>
                      </p>
                    </form>

Cargar_noticias.php
Código PHP:
<? 
include("config_********.php"); 
//conectamos a la base 
$conn mysql_connect($server,$dbuser,$dbpass); 
//Seleccionamos la base 
$connDB mysql_select_db($database,$conn); 
//Ejecucion de la sentencia SQL 
if (isset($_POST["titulo"])) {
    
$titulodb $_POST["titulo"];
    
$categoriadb $_POST["categoria"];
    
$autordb $_POST["autor"];
    
$copetedb $_POST["copete"];
    
$noticiadb $_POST["noticia"];
    
// Hay campos en blanco
    
if($titulodb==NULL|$copetedb==NULL) {
        echo 
"El titulo y/o copete estan vacios.";
    }else{ 
        
//Todo parece correcto procedemos con la inserccion
        
mysql_query("INSERT INTO noticias (titulo_noti,categoria_noti,autor_noti,copete_noti,noticia_noti,fecha_noti,id_noti) VALUES('$titulodb','$categoriadb','$autordb','$copetedb','$noticiadb')",$conn);
        
header("location: administrador_central.php");
        }
?>

Gracias y saludos a todos.