Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/11/2014, 21:40
Waldir95
 
Fecha de Ingreso: noviembre-2014
Mensajes: 8
Antigüedad: 9 años, 5 meses
Puntos: 0
Respuesta: Guardar datos desde ckeditor

<!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">
<!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>
<script src="ckeditor/ckeditor.js"ckeditor/ckeditor.js"></script>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />

<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>


<script src="../js/jquery-1.4.2.min.js" type="text/jscript" > </script>
<script language="JavaScript" src="../js/jquery-1.5.1.min.js"></script>
<!------------->
<link rel="stylesheet" href="css/Divorciocss.css"type="text/css"/>
<link rel="stylesheet" href="css/jquery-ui-1.9.2.custom.min.css" type="text/css"/>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="../css/jquery-ui-1.8.13.custom.css" type="text/css" />
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>


</head>

<?php
include("Codificacion/Marginacion.php");
include("conexion/conexion.php");
?>

<form class="contact_form" action="FormMarginacion.php" id="contact_form" rorciounat="server" method="post">
<div>
<ul>
<li>
<label>Digite el número de partida que se va a marginar:</label>
<input name="NumeroPt" type="text" required id="NumeroPt" placeholder="Digite en numero" />
</li>
<br />
<li>
<textarea name="editor1" id="editor1"></textarea>
<script>
CKEDITOR.replace( 'editor1' );
</script>
</li>
<li>
<button class="submit" type="submit" name="guardar">Guardar Datos</button>
<button class="submit2" type="submit2">Salir</button>

</li>
</ul>
</div>
</form>

Este es el formulario
y este es el codigo php
<?php
$valido=true;
if(isset($_POST['guardar'])){
include("../conexion/conexion.php");
if(isset($_POST['guardar'])){

$editor1=$_POST['editor1'];

echo '<pre>';
var_dump(htmlentities($_POST['editor1']));
echo '</pre>';

$sql1 = "INSERT INTO marginacion(Nombre) VALUES ('$editor1)";
mysql_query($sql1);

echo '¡¡Maginación registrada.!!';

}
}
?>