elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Estamos en la red social de Mastodon


  Mostrar Temas
Páginas: [1]
1  Programación / PHP / PHP ayuda agregar datos en: 16 Octubre 2006, 17:49 pm
A pedido de alguien q no me acuerdo el nick (perdon) re-copio el post de programacion general;
error en PHP Unexpected T_VARIABLE ON LINE **= $autor= $_post ['autor']

Código:
<?php
include("db.php")
$autor = $_POST['autor'];
$titulo = $_POST['titulo'];
$noticia = $_POST['noticia']; 
$sel = "SELECT * from noticias_web"
$sql = "INSERT into noticias_web ('autor','titulo','notica')";
$sql .= "VALUES ('$autor','$titulo','$noticia')";
$res = mysql_query($sel,$sql)
{
if $res
echo "Noticia agregada con éxito" }
{ else
echo "No se pudo agregar la noticia"
}
?>
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines