I am trying to make a function which will check update and insert some data but I am having an issue in the first step where the $stmt->bind_param is saying that is not p
Watch out! mysqli_stmt::bind_param accepts a reference to a variable, not a constant value. Therefore you have to create a variable to hold that 0 and then reference that variable instead.