In that case you should spend a bit of time learning about debugging. Does the event trigger at all? Check if the if-statements work. Echo the values of variables before using them to see if they have the values you expect em to have, etc etc etc