nee*_*eko 3 php mysql database format
我有一个输入文本区域,我想存储用户在数据库的文本区域中的换行符,以便它以与输入文本中相同的方式回显输出文本
例如:
Some text some text some text some text
new line some text some text new line
new line some text new line some text
Run Code Online (Sandbox Code Playgroud)
这是我目前的上传脚本:
$sql = "insert into people (price, contact, category, username, fname, lname, expire, filename) values (:price, :contact, :category, :user_id, :fname, :lname, now() + INTERVAL 1 MONTH, :imagename)";
$q = $conn->prepare($sql) or die("failed!");
$q->bindParam(':price', $price, PDO::PARAM_STR);
$q->bindParam(':contact', $contact, PDO::PARAM_STR);
$q->bindParam(':category', $category, PDO::PARAM_STR);
$q->bindParam(':user_id', $user_id, PDO::PARAM_STR);
$q->bindParam(':fname', $fname, PDO::PARAM_STR);
$q->bindParam(':lname', $lname, PDO::PARAM_STR);
$q->bindParam(':imagename', $imagename, PDO::PARAM_STR);
$q->execute();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
39254 次 |
| 最近记录: |