Code:
if(select=0)


is not a comparison, but an assignment, and will always evaluate to false.