Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/10/2008, 14:23
juanjoseab
 
Fecha de Ingreso: abril-2008
Mensajes: 88
Antigüedad: 16 años, 9 meses
Puntos: 5
Pregunta Cual es mi error

este es mi codigo.... pero cuado se ejecuta me da un error

Catchable fatal error: Object of class stdClass could not be converted to string in /data/members/free/tripod/es/e/n/r/enredjuanjose/htdocs/procesardatos.php on line 21

Código php:
Ver original
  1. <?php
  2.    session_start();
  3.    include("conex.php");
  4.    $link=Conectarse();
  5.    $clave=$_GET['clave'];
  6.  
  7.  
  8. if ($clave=='noticia') {
  9.  
  10.    $usuario= $_SESSION['usuario'];
  11.    $date=$_GET['fecha'];
  12.    $fecha=explode("/",$date);
  13.    $dia=$fecha[0];
  14.    $mes=$fecha[1];
  15.    $ano=$fecha[2];
  16.    $lafecha=$ano.'-'.$mes.'-'.$dia;
  17.  
  18.    $id=date("Y-d-m-H-i-s");
  19.    $noticia=$_GET['noticia'];
  20.  
  21.    mysql_query("insert into noticias (noticia_id,noticia_fecha,noticia_texto,noticia_usuario) values ('$id','$lafecha','$noticia','$usuario')",$link);
  22.     echo 'noticia ingresada exitosamente';
  23.    header("Location : admin.php");
  24. }
  25. ?>
No tengo ni la mas minima idea!!! para mi el cadigo esta bien

Última edición por GatorV; 13/10/2008 a las 14:39