Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/07/2004, 01:26
Avatar de HiTek
HiTek
 
Fecha de Ingreso: noviembre-2003
Ubicación: LF, Santiago.Chile
Mensajes: 217
Antigüedad: 20 años, 4 meses
Puntos: 0
script que no funciona ayuda plz!

he revisado 1 y 1000 veces este scritp que me envia un mensaje a la bd, no puedo determinar aún el porque no funciona, desgraciadamente no envia absolutamente ningún mensaje, probe en Iexplorer y mozilla para descartar navegador y nada...plz una mano lava la otra dicen...gracias de antemano

Código PHP:
<? include("include/functions.inc.php");
    if(isset( 
$SID )){
        
session_start();
        
session_name($SID);
    }
    if(isset(
$_SESSION("USER_ID")))
    {
        
$titulo addslashes(trim(strip_tags($_POST["txt_titulo"])));
        
$tipo addslashes(trim(strip_tags($_POST["txt_tipo"])));
        
$mensaje addslashes(trim(strip_tags($_POST["txt_mensaje"])));
        
$error "";
        if(empty(
$titulo)) $error.="t";

        if(empty(
$mensaje)) $error.="m";

        if(
$error!=""){
            
header("Location: rmc.php?error=$error");
        }else{
            
$link=conecta();
            
$user=mysql_query("select * from tbl_user where user_id=".$_SESSION["USER_ID"]) or die("error identificado 1");
            
$rs=mysql_fetch_array($user);
            
$fecha=date(d."/".m."/".Y);
            
$sql_msg="insert into tbl_msg_msg (msg_date,msg_from,msg_type,msg_subject,msg_msg, msg_email,msg_status) values ('".$fecha."','".$_SESSION[ss_username]."','".$tipo."','".$titulo."','".$mensaje."','".$rs["user_email"]."','N')";
            
mysq_query$sql_msg ) or die("error identificado");
            
header("Location: rmc.php?send=ok");
        }
    }else{
        
$link=conecta();
        
$nombre  addslashes(trim(strip_tags$_POST["txt_name"] )));
        
$email   addslashes(trim(strip_tags$_POST["txt_email"] )));
        
$titulo  addslashes(trim(strip_tags$_POST["txt_titulo"] )));
        
$tipo    addslashes(trim(strip_tags$_POST["txt_tipo"] )));
        
$mensaje addslashes(trim(strip_tags$_POST["txt_mensaje"] )));
        
$error="";
        if(empty(
$nombre)) {
            
$error.="n";
        }
        if(empty(
$email)){
            
$error.="e";
        }
        if(empty(
$titulo)){
            
$error.="t";
        }
        if(empty(
$mensaje))
        {
            
$error.="m";
        }
        if(
$error!=""){
            
header("Location: rmc.php?error=$error");
        }else{
            
$fecha=date(d."/".m."/".Y);
            
$sql_msg="insert into tbl_msg_msg (msg_date,msg_from,msg_type,msg_subject,msg_msg, msg_email,msg_status) VALUES ('".$fecha."','".$nombre."','".$tipo."','".$titulo."','".$mensaje."','".$email."','N')";
            
mysq_query$sql_msg ) or die("error NO identificado");
            
header("Location: rmc.php?send=ok");
        }
    }
?>