我有一个带有输入文本框的表单,该文本框将内容存储在mysql数据库中。
例如,我在输入框中写入:
Hello World!
Here is the new line
在数据库中,我发现完全相同的文本没有任何特殊字符(“这里是.”)从数据库中的新行开始)。
当我在php回显中调用这些数据时,它会将其显示为:
Hello World! Here is the new line
怎么了?我怎么才能修好它?谢谢
我希望这段代码在HTML页面上显示来自表单的文本输入的信息,使用数组,它会将信息放入一个数组中,然后在文本区域中显示它,尽管每次它都覆盖第一行,而不是正确显示
var count = 0;
var input = document.forms["ShoppingForm"]["choiceTxt"].value;
function listChoice(){
count++;
var arr = new Array();
arr[count] = document.forms["ShoppingForm"]["
我想在HTML5表单中添加Symfony2颜色输入类型(目前只有Chrome支持)。我创建了一个新的颜色类型,它继承了文本类型:
<?php
namespace Marquis\WebsiteBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
class ColorType extends AbstractType
{
public function getParent()
{
return 'text';
}
public function getN
我使用文本区来收集用户的评论。文本区域保留下一行和空格缩进。在p标记中显示注释时,下一行和行首的空格缩进都会丢失。
我在文本区域中输入以下文本:
Lorem ipsum dolor sit amet,
consectetur adipisicing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua
表单save将保留注释中的下一行。
我将注释显示为:
%p #{@user.comment}
这将显示以下文本:
Lorem ipsum dolor sit amet, consectetur ad
我有一个表单,使用它可以在一个文本区域中输入多行文本。其中一些行也可以有html标记。假设有一行是粗体的。
我应该如何将文本保存到数据库中?我应该像这样存储它们吗?
This is a greap post
<br/>
I love this type of findings.
<br/>
<br/>
Thanks for sharing
或者像这样?
This is a greap post
<br/>
I love this type of findings.
<br/>
<br/&a