Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/10/2011, 10:32
charlescuellar
 
Fecha de Ingreso: abril-2008
Mensajes: 310
Antigüedad: 16 años
Puntos: 4
error de sintaxis

hola amigos me pueden hechar una mano con este update que estoy haciendo me aparece error de sintaxis

chequen el codigo

Código PHP:
<?php
include("../connect.php");
if (
$_SERVER['REQUEST_METHOD'] == 'POST')
{
    
$nota $_POST['nota'];
    
$id $_POST['id_nota'];
    
    if (empty(
$nota))
    die(
"<div style='background:RED; color:#FFF; padding:10px;'>Por favor, llena la nota. <a style='color:white'href='javascript:history.back(1)'>Intenta de nuevo</a></div>");
    
    
    if (empty(
$id))
    die(
"<div style='background:RED; color:#FFF; padding:10px;'>Por favor, llena la id del nota. <a style='color:white'href='javascript:history.back(1)'>Intenta de nuevo id tweet</a></div>");
    
    
$link "UPDATE clasinota SET nota'$nota' WHERE id_nota='$id'";
    
$res mysql_query($link) or die(mysql_error());
    if (
$res)
    die(
"<div style='background:GREEN; color:#FFF; padding:10px;'>nota Editada exitosamente.<a style='color:white'href='mostrar-nota.php'> ir al menu</a></div> ");     
}
else
{
    
$id_tweet preg_replace("/'\/<>\"/","",$_GET['id_nota']);
    if (empty(
$id_nota))
    die(
"Invalido ID");    
    
$link "SELECT * FROM clasinota WHERE id_nota='$id_nota'";
    
$res mysql_query($link) or die(mysql_error());
    
$r mysql_fetch_assoc($res);
    
}
       
?>