Every person who forges or alters a prescription or who issues or utters an altered prescription, or who issues or utters a prescription bearing a forged or fictitious signature for any narcotic drug, or who obtains any narcotic drug by any forged, fictitious, or altered prescription, or who has in possession any narcotic drug secured by a forged, fictitious, or altered prescription, shall be punished by imprisonment in the county jail for not less than six months nor more than one year, or in the state prison.