When marketed under the name Fioricet with Codeine, the drug is used in the treatment of headaches and sometimes for migraines. Other combinations of codeine and mixed drugs are also prescribed for the treatment of migraines such as Tylenol with Codeine, Tylenol with Codeine #3 or Tylenol with Codeine #4.