copy and paste on textarea won't work on mysql
if i copy a text paragraph and paste it on a textarea for an update content my mysql database won't update the content but when i type it manually on the textarea, the mysql database will then be update the content..how can i update the content in the mysql using copy and paste method
if (isset($_POST['submit'])) {
$main = $_POST['main'];
$result = mysql_query("UPDATE tbl_content SET main ='$main' WHERE users = '$name'
}
<textarea name="mep" id="mep" rows="3" cols="50"></texta开发者_如何学Gorea>
<input type="submit" name="submit" id="button" value="Submit" />
Textarea is named mep
not main
.
$main = $_POST['mep'];
Please provide more information. And that C/P thing doesn't make sense, it should work.
Try with:
$main = mysql_real_escape_string($_POST['main']);
ah, and what @webarto said.
精彩评论