You're probably getting a notice that there is an undefined variable on line 4. That is because $_post does not exist. Variable names in PHP are case-sensitive. This means that you need to use $_POST (with capital letters) - this represents the values that are sent with the POST request.
You will also get a notice if an array key is undefined. That means that if $_POST['user_id'] is undefined, you will be notified of it. This is not a serious error, and you can turn the reporting of notices off with for example:
// Report all errors except E_NOTICE
error_reporting(E_ALL & ~E_NOTICE);