No, that doesn't do anything in this case. The error message clearly says that this is an index problem: When the $_POST array doesn't have a "hotel_id" index, then $_POST['hotel_id'] will always generate a notice -- unless you use isset(). You could also check for array_key_exists().

You get the warning when you access an array key which does not exist. The setting of some other variable doesn't matter, you still need to call isset() before you check an array key you're not sure will exist.