插入数据库后使用&textarea后缺少文本

I have a form where users can add a description with the post they are about to submit. I want the user to add whatever text they want in the textarea. When i was testing i came across this annoying error. Whenever i added & to the sentence the text after that just Disappeared. Example:

Input: This is a good day for a walk & i feel like a million bucks.

Ouput: This is a good day for a walk

This happens when i $_POST or $_GET variables. I thought it was magic_quotes_gpc but i checked in my php.ini file and it is off. I have no idea whats going on. And its not just & but other characters as well. Thank you

You have to validate & sanitize your input. If you don't, it is extra easy to hack. Look into filter_var()

In your case, you could get by with just:

$textareaData = htmlspecialchars($_POST['textarea']);

But, ideally, you'll want to:

$textareaData = filter_var($_POST['textarea'], FILTER_SANITIZE_STRING);