Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/05/2012, 16:15
jhongo201
 
Fecha de Ingreso: julio-2011
Ubicación: cucuta
Mensajes: 26
Antigüedad: 13 años, 2 meses
Puntos: 0
Pregunta tinymce no me captura datos del textarea

buenas tardes

primero q nada disculpenme si es un repost,

lo que me sucede es lo siguiente tengo el tinyMCE y lo muestra hasta ahy todo va bien pero el problema esta es cuando trato de capturar con el contenido del textarea para guardarlo en la base de datos y mostrarlo el codigo q utilizo es el siguelte:

este es el codigo del editor

Código PHP:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<
title>Documento sin título</title>
<
script type="text/javascript" src="../editor/editor/tiny_mce/tiny_mce.js"></script> 
<script type="text/javascript">

   tinyMCE.init({ 
        // General options 
        language : 'es',
        mode : "exact", 
        elements : "elm1", 
        theme : "advanced", 
        plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave", 

        // Theme options 
        theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", 
        theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", 
        theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", 
        theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft", 
        theme_advanced_toolbar_location : "top", 
        theme_advanced_toolbar_align : "left", 
        theme_advanced_statusbar_location : "bottom", 
        theme_advanced_resizing : true, 

        // Example content CSS (should be your site CSS) 
        content_css : "css/content.css", 

        // Drop lists for link/image/media/template dialogs 
        template_external_list_url : "lists/template_list.js", 
        external_link_list_url : "lists/link_list.js", 
        external_image_list_url : "lists/image_list.js", 
        media_external_list_url : "lists/media_list.js", 

        // Replace values for the template plugin 
        template_replace_values : { 
            username : "Some User", 
            staffid : "991234" 
        } 
    }); 
</script>
</head>

<body>
<form id="form1" name="form1" method="get" action="ejemplo usuario/insert/guardaEditorEnBD.php">
  <textarea name="editor1" id="elm1" cols="80" rows="15" style="width:80%"></textarea>
</form>
</body>
</html> 


hasta aqui va todo bn o almenos eso creo

el siguiente codigo me deberia capturar el contenido y mostrarlo pero nose si esta bien o no sino lo esta porfavor colaborenme en como hacerlo y ademas debe guardarlo en la base de datos pero no lo hace


Código PHP:


<?php
require("conexion.php");
$status "";
if (isset(
$_POST["editor1"])) {
    
$texto $_POST['editor1'];
    
    
$sql "INSERT INTO editor (editor) ";
    
$sql.= "VALUES ('".$texto."')";
    
    
mysql_query($sql$conexion);
    
$status "ok";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>PHP con MySQL: Insertar datos en MySQL</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h3>resultado</h3>
<?php if ($status == "ok") { ?>
<p class="confirm">Registro guardado correctamente</p>
<?php ?>

</body>
</html>