如何拥有一个保存HTML并将其发送到数据库的表单(PhpMyAdmin)?

时间:2019-06-03 23:06:44

标签: html css sql

我想在我的网站管理中实现,当输入数据时,我们不必手动引入html命令,从而使文本格式良好。在我呈现的图像中,是否可以呈现某些图像?谢谢!

后台需要这样的东西

https://imgur.com/sCPXYXz

<div class="container">
    <div class="col-sm-12">
    <br>
        <?php
        if(isset($errorMsg))
        {
            ?>
            <div class="alert alert-danger">
                <strong><?php echo $errorMsg; ?></strong>
            </div>
            <?php
        }
        if(isset($insertMsg)){
        ?>
            <div class="alert alert-success">
                <strong><?php echo $insertMsg; ?></strong>
            </div>
        <?php
        }
        ?>
        <br>
        <h2>Nova Publicação</h2>
        <br>
        <br>
        <form method="post" class="form-horizontal" enctype="multipart/form-data">
            <div class="form-group">
                <div class="localizacao">Título</div>
                <br>
                <textarea class="form-control" name="txt_titulo" rows="1" required></textarea>
            </div>
            <div class="form-group">
                <div class="localizacao">Texto</div>
                <br>
                <textarea class="form-control" name="txt_texto" rows="12" required></textarea>
            </div>
            <br>
            <h3>Formatação do texto</h3>
            <br>
            <img src="conteudo/formatacao.png">     
            <br>    
            <br>
            <div class="form-group">
                <div class="titulo">Selecionar Imagem</label>
                <input type="file" name="txt_file" class="form-control" />
                <br>
            </div>          
            <div class="form-group" align="center">
                <input type="submit"  name="btn_insert" class="btn btn-success custom-btn" value="Publicar">
                <a href="admin_recuperacao" class="btn btn-danger custom-btn">Cancelar</a>
            </div>
            <br>
        </form>
    </div>
</div>
</div>

0 个答案:

没有答案