I am using php to get textarea value using post method but getting a weird result with that let me show you my code
Try to use different id and name parameters, currently you have same here. Please visit the link below for the same, this might be help you :
Issue using $_POST with a textarea
Use htmlspecialchars():
echo htmlspecialchars($_POST['contact_list']);
You can even improve your form processing by stripping all tags with strip_tags() and remove all white spaces with trim():
function processText($text) {
$text = strip_tags($text);
$text = trim($text);
$text = htmlspecialchars($text);
return $text;
}
echo processText($_POST['contact_list']);