I am trying to use a textarea to add a row in a db table for each line. My code below is working but it is appending a "%0D" (without the quotes) at the end of each item. Anyone know how I can get rid of that? Thanks!
PHP Code:<?
include("dbconnect.inc");
$data = explode("\n", $_POST['item']);
$rows = count($data);
foreach($data AS $key=>$value){
mysql_query("INSERT into items_list (item) VALUES ('$value')");
}
?>





Bookmarks