A rapid and sensitive flow-injection spectrophotometric method is proposed for the determination of sulfadiazine and sulfamethoxazole. This method is based on the diazotization of sulfonamide with sodium nitrite, and a coupling reaction of the diazo-compound with α-naphthylamine. The optimum experimental conditions are obtained by using the controlled and weighted centroid simplex method. The linear ranges for the determination of sulfadiazine and sulfamethoxazole are 0.2 -20 µg ml -1 and 0.1 -20 µg ml -1 , and their detection limits are 0.06 µg ml -1 and 0.05 µg ml -1 , respectively, and the sampling frequency is 130 samples per hour. The method has been used to determine sulfadiazine and sulfamethoxazole in pharmaceuticals and urine without separation. The results are in agreement with those obtained by a high-performance liquid chromatograph technique at the 95% confidence level.