我的HTML中有一个textarea。如何将其发布到我的PHP?
<textarea>
<div id="keditor-content-area-1496927072839" class="keditor-content-area ui-droppable ui-sortable"><section class="keditor-container keditor-initialized-container showed-keditor-toolbar" id="keditor-container-1496927074545"> <section class="keditor-container-inner"><div class="row"> <div class="col-sm-12 keditor-container-content ui-droppable ui-sortable" data-type="container-content" id="keditor-container-content-1496927074546"> <section class="keditor-component keditor-initialized-component" data-type="component-text" id="keditor-component-1496927076874"> <section class="keditor-component-content cke_editable cke_editable_inline cke_contents_ltr cke_show_borders" id="keditor-component-content-1496927076875" contenteditable="true" tabindex="0" spellcheck="false" role="textbox" aria-label="false" aria-describedby="cke_46"><div class="page-header"><h1 style="margin-bottom: 30px; font-size: 50px;"><b class="text-uppercase">Cras justo odio</b> <small>Donec id elit non mi</small></h1><p class="lead"><em>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</em></p></div></section><div class="keditor-toolbar keditor-toolbar-component"> <a href="#" class="btn-component-reposition"><i class="fa fa-arrows"></i></a> <a href="#" class="btn-component-duplicate"><i class="fa fa-files-o"></i></a> <a href="#" class="btn-component-delete"><i class="fa fa-times"></i></a></div></section></div> </div></section><div class="keditor-toolbar keditor-toolbar-container"> <a href="#" class="btn-container-reposition"><i class="fa fa-sort"></i></a> <a href="#" class="btn-container-duplicate"><i class="fa fa-files-o"></i></a> <a href="#" class="btn-container-delete"><i class="fa fa-times"></i></a></div></section></div>
</textarea>
但总是需要 Cras justo odio,dapibus ac facilisis in,egestas eget quam。在eget metus的Donec id elit non mi porta gravida。 Nullam id dolor id nibh ultricies vehicula ut id elit。 在帖子中我想要所有div标签和所有HTML代码。请帮帮我。
答案 0 :(得分:0)
你需要这样的东西:
if(isset($_POST['textarea_value'])){
echo $_POST['textarea_value'];
}
<form method="post" action="">
<textarea name="textarea_value"></textarea>
<input type="submit" value="Send" />
</form>