How can get the contents of YUI rich text box in HTML format to POst.php page.
index.php
<?php
if (isset($_POST['submit'])) {
echo 'You entered: <br />';
echo 'name: ' . $_POST['name'] . '<br />'; // this works fine
echo $_POST['message']; // this does not work
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=(0070)http://designshack.net/tutorialexamples/csslayouts/_fluid_threecolumn/ -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Blogzine</title>
<!-- Javascript -->
<script src="files/common.js" type="text/javascript"></script>
<!-- Stylesheets -->
<link href="files/default.css" rel="stylesheet" type="text/css" media="screen, all">
<link href="files/inherit.css" rel="stylesheet" type="text/css" media="screen, all">
<!-- Meta Information -->
<meta name="keywords" content="Keywords">
<meta name="description" content="Built by Twentythree [http://twe.nty3.com]">
<meta http-equiv="cache-control" content="public">
<meta http-equiv="expires" content="never">
<meta name="robots" content="index, follow">
<meta name="revisit-after" content="14 days">
<meta name="author" content="Twentythree - Mitchell Bryson">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/fonts/fonts-min.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/menu/assets/skins/sam/menu.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/button/assets/skins/sam/button.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/editor/assets/skins/sam/simpleeditor.css" />
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/element/element-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/container/container_core-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/menu/menu-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/button/button-min.js"></script>
<script type="text/javascript" src="editor/simpleeditor-min.js"></script>
<script type="text/javascript">
window.onload=function() {
document.getElementById("date1").style.display = 'none';
}
function toggle(val){
if(val=='show')
document.getElementById("date1").style.display = 'block';
else
document.getElementById("date1").style.display = 'none';
}
</script>
</head>
<body class="yui-skin-sam">
<div id="container">
<a href="http://designshack.net/tutorialexamples/csslayouts/_fluid_threecolumn/#content" name="top" title="skip to content" class="x">skip to content</a>
<div id="header">
<h1><b><font size= "32" face="lucida handwriting" color="#6495ed">Blogzine</font></b></h1>
</div> <!-- end div#header -->
<a name="content"></a>
<div id="content">
<div class="column" id="left">
column
</div> <!-- end div.column div#left -->
<div class="column" id="right">
column
</div> <!-- end div.column div#right -->
<div id="center">
<!--BEGIN SOURCE CODE FOR EXAMPLE =============================== -->
<form method="post" action="post.php" id="form1"onsubmit="return myDoSubmit()">
<br /><br />
<font size=4 color="Red" face="verdana" ><b>Post Title:</b></font> <br /><br /><input type="text" name="ptitle" style="height:30px; width:520px" /><br />
<br />
<font size=4 color="Red" face="verdana" ><b>Description:</b></font> <br />
<br />
<textarea id="editor" name="message">
<!--Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse justo nibh,
pharetra at, adipiscing ullamcorper, rutrum ac, enim. Nullam pretium interdum metus.
Ut in neque. Vivamus ut lorem vitae turpis porttitor tempor. Nam consectetuer est quis lacus.
-->
</textarea>
<!--<button type="button" id="submitEditor">Submit Post</button><br>-->
<br />
<Table width="100%" border="0"><TR ><Td width="50%">
<input type="submit" name="submit" value="Post" style="width:100px; height:40px;" />
</Td><Td width="50%" align="left">
<font size=2 color="Red" face="verdana" ><b>Post Date and Time:</b></font> <br />
<input type="radio" name="timestamp" value="automatic" checked="true" onclick="toggle('hide');" /> Automatic<br />
<input type="radio" name="timestamp" value="custom"onclick="toggle('show');"/> Scheduled at
<?php
/* $answer = $_POST['timestamp'];
if ($answer == "automatic") {
echo 'Correct';
}
else {
echo 'Incorrect';
}
*/
?>
<Div id="date1" style="padding-left:20px">
<span id="date12"><input type="text"name="date" align="Center" style="height:25px; display:hidden; width:70px" value='<?php echo date("d/m/Y");?>'/></b></span>
<span id="date12"><input type="text"name="time" align="Center" style="height:25px; display:hidden; width:80px" value='<?php echo date("H:i:s A");?>'/></b></span>
<Div>
</Td></Tr></Table>
</form>
<script>
(function() {
var Dom = YAHOO.util.Dom,
Event = YAHOO.util.Event;
var myConfig = {
height: '300px',
width: '530px',
dompath: true,
focusAtStart: true,
handleSubmit: true
};
YAHOO.log('Create the Editor..', 'info', 'example');
var myEditor = new YAHOO.widget.SimpleEditor('editor', myConfig);
myEditor._defaultToolbar.buttonType = 'advanced';
myEditor.render();
function myDoSubmit() {
//alert('handling submit!');
myEditor.saveHTML();
var html1 = myEditor.getcontent();
//alert(document.getElementById('msgpost').value);
return html1;
}
})();
</script>
<!--END SOURCE CODE FOR EXAMPLE =============================== -->
<!--MyBlogLog instrumentation-->
<script type="text/javascript" src="http://track2.mybloglog.com/js/jsserv.php?mblID=2007020704011645"></script>
</div> <!-- end div#center -->
</div> <!-- end div#content -->
<div id="footer">
footer <a href="http://twe.nty3.com/">twentythree</a> <a href="http://designshack.net/tutorialexamples/csslayouts/_fluid_threecolumn/information.html">info</a>
</div> <!-- end div#footer -->
<a href="http://designshack.net/tutorialexamples/csslayouts/_fluid_threecolumn/#top" name="bottom" title="back to top" class="x">back to top</a>
</div> <!-- end div#container -->
<!-- I'd like to know how many people use this template -->
<!-- so i would appreciate leaving the text below! -->
<!-- This is optional, obviously! -->
<em class="x">zfdsr4xucrrfa inz43rotp</em>
</body></html>
<script type="text/javascript"
src="http://l.yimg.com/d/lib/rt/rto1_78.js"></script><script>var rt_page="2012400090:FRTMA"; var
rt_ip="123.201.239.158";
if ("function" == typeof(rt_AddVar) ){ rt_AddVar("ys", escape("19198B62")); rt_AddVar("cr", escape("uM.b.rpBMKK"));
rt_AddVar("sg", escape("/SIG=13s5o5kje1fe52jh7dol9f&b=4&d=0h7FUeZpYF4DluzNpIDd.UksFrLOobXFLahkkPk-&s=p1&i=opw60.HkLtHAP9m7Vw--/1324872429/123.201.239.158/19198B62")); rt_AddVar("yd", escape("2574680066"));
}</script><noscript><img src="http://rtb.pclick.yahoo.com/images/nojs.gif?p=2012400090:FRTMA"></noscript>
<!-- SpaceID=2012400090 loc=FSRVY noad -->
<script language=javascript>
if(window.yzq_d==null)window.yzq_d=new Object();
window.yzq_d['37EuF2KL5NQ-']='&U=12d42cltf%2fN%3d37EuF2KL5NQ-%2fC%3d-1%2fD%3dFSRVY%2fB%3d-1%2fV%3d0';
</script><noscript><img width=1 height=1 alt="" src="http://us.bc.yahoo.com/b?P=_TuskWKLGUkXuKKcTtxVLxHBe8nvnk738u0AAana&T=18134dunl%2fX%3d1324872429%2fE%3d2012400090%2fR%3ddev_net%2fK%3d5%2fV%3d2.1%2fW%3dH%2fY%3dYAHOO%2fF%3d376191452%2fH%3dc2VydmVJZD0iX1R1c2tXS0xHVWtYdUtLY1R0eFZMeEhCZThudm5rNzM4dTBBQWFuYSIgc2l0ZUlkPSI0NDY1NTUxIiB0U3RtcD0iMTMyNDg3MjQyOTExMTI1MSIg%2fQ%3d-1%2fS%3d1%2fJ%3d19198B62&U=12d42cltf%2fN%3d37EuF2KL5NQ-%2fC%3d-1%2fD%3dFSRVY%2fB%3d-1%2fV%3d0"></noscript><script language=javascript>
if(window.yzq_d==null)window.yzq_d=new Object();
window.yzq_d['3bEuF2KL5NQ-']='&U=13empf5dk%2fN%3d3bEuF2KL5NQ-%2fC%3d289534.9603437.10326224.9298098%2fD%3dFOOT%2fB%3d4123617%2fV%3d1';
</script><noscript><img width=1 height=1 alt="" src="http://us.bc.yahoo.com/b?P=_TuskWKLGUkXuKKcTtxVLxHBe8nvnk738u0AAana&T=182sqbeti%2fX%3d1324872429%2fE%3d2012400090%2fR%3ddev_net%2fK%3d5%2fV%3d2.1%2fW%3dH%2fY%3dYAHOO%2fF%3d3892183090%2fH%3dc2VydmVJZD0iX1R1c2tXS0xHVWtYdUtLY1R0eFZMeEhCZThudm5rNzM4dTBBQWFuYSIgc2l0ZUlkPSI0NDY1NTUxIiB0U3RtcD0iMTMyNDg3MjQyOTExMTI1MSIg%2fQ%3d-1%2fS%3d1%2fJ%3d19198B62&U=13empf5dk%2fN%3d3bEuF2KL5NQ-%2fC%3d289534.9603437.10326224.9298098%2fD%3dFOOT%2fB%3d4123617%2fV%3d1"></noscript><!--QYZ ,;;;2012400090;;-->
<!-- VER-3.0.205072 -->
<script language=javascript>
if(window.yzq_p==null)document.write("<scr"+"ipt language=javascript src=http://l.yimg.com/d/lib/bc/bc_2.0.5.js></scr"+"ipt>");
</script><script language=javascript>
if(window.yzq_p)yzq_p('P=_TuskWKLGUkXuKKcTtxVLxHBe8nvnk738u0AAana&T=17tohe3ai%2fX%3d1324872429%2fE%3d2012400090%2fR%3ddev_net%2fK%3d5%2fV%3d1.1%2fW%3dJ%2fY%3dYAHOO%2fF%3d1525159338%2fH%3dc2VydmVJZD0iX1R1c2tXS0xHVWtYdUtLY1R0eFZMeEhCZThudm5rNzM4dTBBQWFuYSIgc2l0ZUlkPSI0NDY1NTUxIiB0U3RtcD0iMTMyNDg3MjQyOTExMTI1MSIg%2fS%3d1%2fJ%3d19198B62');
if(window.yzq_s)yzq_s();
</script><noscript><img width=1 height=1 alt="" src="http://us.bc.yahoo.com/b?P=_TuskWKLGUkXuKKcTtxVLxHBe8nvnk738u0AAana&T=182b5nc6l%2fX%3d1324872429%2fE%3d2012400090%2fR%3ddev_net%2fK%3d5%2fV%3d3.1%2fW%3dJ%2fY%3dYAHOO%2fF%3d1413453002%2fH%3dc2VydmVJZD0iX1R1c2tXS0xHVWtYdUtLY1R0eFZMeEhCZThudm5rNzM4dTBBQWFuYSIgc2l0ZUlkPSI0NDY1NTUxIiB0U3RtcD0iMTMyNDg3MjQyOTExMTI1MSIg%2fQ%3d-1%2fS%3d1%2fJ%3d19198B62"></noscript><script language=javascript>
(function(){window.xzq_p=function(R){M=R};window.xzq_svr=function(R){J=R};function F(S){var T=document;if(T.xzq_i==null){T.xzq_i=new Array();T.xzq_i.c=0}var R=T.xzq_i;R[++R.c]=new Image();R[R.c].src=S}window.xzq_sr=function(){var S=window;var Y=S.xzq_d;if(Y==null){return }if(J==null){return }var T=J+M;if(T.length>P){C();return }var X="";var U=0;var W=Math.random();var V=(Y.hasOwnProperty!=null);var R;for(R in Y){if(typeof Y[R]=="string"){if(V&&!Y.hasOwnProperty(R)){continue}if(T.length+X.length+Y[R].length<=P){X+=Y[R]}else{if(T.length+Y[R].length>P){}else{U++;N(T,X,U,W);X=Y[R]}}}}if(U){U++}N(T,X,U,W);C()};function N(R,U,S,T){if(U.length>0){R+="&al="}F(R+U+"&s="+S+"&r="+T)}function C(){window.xzq_d=null;M=null;J=null}function K(R){xzq_sr()}function B(R){xzq_sr()}function L(U,V,W){if(W){var R=W.toString();var T=U;var Y=R.match(new RegExp("\\\\(([^\\\\)]*)\\\\)"));Y=(Y[1].length>0?Y[1]:"e");T=T.replace(new RegExp("\\\\([^\\\\)]*\\\\)","g"),"("+Y+")");if(R.indexOf(T)<0){var X=R.indexOf("{");if(X>0){R=R.substring(X,R.length)}else{return W}R=R.replace(new RegExp("([^a-zA-Z0-9$_])this([^a-zA-Z0-9$_])","g"),"$1xzq_this$2");var Z=T+";var rv = f( "+Y+",this);";var S="{var a0 = '"+Y+"';var ofb = '"+escape(R)+"' ;var f = new Function( a0, 'xzq_this', unescape(ofb));"+Z+"return rv;}";return new Function(Y,S)}else{return W}}return V}window.xzq_eh=function(){if(E||I){this.onload=L("xzq_onload(e)",K,this.onload,0);if(E&&typeof (this.onbeforeunload)!=O){this.onbeforeunload=L("xzq_dobeforeunload(e)",B,this.onbeforeunload,0)}}};window.xzq_s=function(){setTimeout("xzq_sr()",1)};var J=null;var M=null;var Q=navigator.appName;var H=navigator.appVersion;var G=navigator.userAgent;var A=parseInt(H);var D=Q.indexOf("Microsoft");var E=D!=-1&&A>=4;var I=(Q.indexOf("Netscape")!=-1||Q.indexOf("Opera")!=-1)&&A>=4;var O="undefined";var P=2000})();
</script><script language=javascript>
if(window.xzq_svr)xzq_svr('http://csc.beap.ad.yieldmanager.net/');
if(window.xzq_p)xzq_p('i?bv=1.0.0&bs=(128vg0p8l(gid$_TuskWKLGUkXuKKcTtxVLxHBe8nvnk738u0AAana,st$1324872429111251,v$1.0))&t=J_3-D_3');
if(window.xzq_s)xzq_s();
</script><noscript><img width=1 height=1 alt="" src="http://csc.beap.ad.yieldmanager.net/i?bv=1.0.0&bs=(128vg0p8l(gid$_TuskWKLGUkXuKKcTtxVLxHBe8nvnk738u0AAana,st$1324872429111251,v$1.0))&t=J_3-D_3"></noscript>
<!-- p2.ydn.bf1.yahoo.com compressed/chunked Sun Dec 25 20:07:09 PST 2011 -->
post.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=(0070)http://designshack.net/tutorialexamples/csslayouts/_fluid_threecolumn/ -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Blogzine</title>
<!-- Javascript -->
<script src="files/common.js" type="text/javascript"></script>
<!-- Stylesheets -->
<link href="files/default.css" rel="stylesheet" type="text/css" media="screen, all">
<link href="files/inherit.css" rel="stylesheet" type="text/css" media="screen, all">
<!-- Meta Information -->
<meta name="keywords" content="Keywords">
<meta name="description" content="Built by Twentythree [http://twe.nty3.com]">
<meta http-equiv="cache-control" content="public">
<meta http-equiv="expires" content="never">
<meta name="robots" content="index, follow">
<meta name="revisit-after" content="14 days">
<meta name="author" content="Twentythree - Mitchell Bryson">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/fonts/fonts-min.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/menu/assets/skins/sam/menu.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/button/assets/skins/sam/button.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/editor/assets/skins/sam/simpleeditor.css" />
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/element/element-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/container/container_core-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/menu/menu-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/button/button-min.js"></script>
<script type="text/javascript" src="editor/simpleeditor-min.js"></script>
</head>
<body class="yui-skin-sam">
<div id="container">
<a href="http://designshack.net/tutorialexamples/csslayouts/_fluid_threecolumn/#content" name="top" title="skip to content" class="x">skip to content</a>
<div id="header">
<h1><b><font size= "32" face="lucida handwriting" color="#6495ed">Blogzine</font></b></h1>
</div> <!-- end div#header -->
<a name="content"></a>
<div id="content">
<div class="column" id="left">
column
</div> <!-- end div.column div#left -->
<div class="column" id="right">
column
</div> <!-- end div.column div#right -->
<div id="center">
<?php
if (isset($_POST['submit'])) {
//echo '<font size=2 color="Red" face="verdana" ><b>'.'Post Title: '.'</b></font><br />';
echo '<font size=4 color="Red" face="verdana" ><b>'.$_POST['ptitle']. '</b></font><br /><br />'; //Blog Description
//echo '<font size=2 color="Red" face="verdana" ><b>'.'Description: '.'</b></font><br />' ;
echo $_POST['message'].'<br />'; //Blog Description
//$val = '<script type="text/javascript">var html = editor.get('element').value;</script>';
//echo $val;
}
?>
</div> <!-- end div#center -->
</div> <!-- end div#content -->
<div id="footer">
footer <a href="http://twe.nty3.com/">twentythree</a> <a href="http://designshack.net/tutorialexamples/csslayouts/_fluid_threecolumn/information.html">info</a>
</div> <!-- end div#footer -->
<a href="http://designshack.net/tutorialexamples/csslayouts/_fluid_threecolumn/#top" name="bottom" title="back to top" class="x">back to top</a>
</div> <!-- end div#container -->
<!-- I'd like to know how many people use this template -->
<!-- so i would appreciate leaving the text below! -->
<!-- This is optional, obviously! -->
<em class="x">zfdsr4xucrrfa inz43rotp</em>
</body></html>