Brookmeyer and Crowley derived a non-parametric confidence interval for the median survival time of a homogeneous population by inverting a generalization of the sign test for censored data. The 1-alpha confidence interval for the median is essentially the set of all values t such that the Kaplan--Meier estimate of the survival function at time t does not differ significantly from one-half at significance level alpha. Here I extend the method to incorporate covariates into the analysis by assuming an underlying piecewise exponential model with proportional hazards covariate effects. Maximum likelihood estimates of the model parameters are obtained via iterative techniques, from which the estimated (log) survival curve is easily constructed. The delta method provides asymptotic standard errors. Following Brookmeyer and Crowley, I find the confidence interval for the median survival time at a specified value of the covariate vector by inverting the sign test. I illustrate the methods using data from a clinical trial conducted by the Radiation Therapy Oncology Group in cancer of the mouth and throat. It is seen that the piecewise exponential model provides considerable flexibility in accommodating to the shape of the underlying survival curve and thus offers advantages to other, more restrictive, parametric models. Simulation studies indicate that the method provides reasonably accurate coverage probabilities.