how can i use $_COOKIE[] + PostID to execute the below code?

how can i use $_COOKIE[] + PostID to execute the below code?