Item buy and the validation

PLease copy and replace the code in view_post.php