As @Scortchi [notes][1], you can also use orthogonal polynomials.  Here is a quick demonstration in R:  

<!-- language: lang-r -->

    set.seed(3406)
    N      = 50
    real.x = runif(N, 0, 10)
    ord.x  = cut(real.x, breaks=c(0,2,4,6,8,10), labels=FALSE)
    ord.x  = factor(ord.x, levels=1:5, ordered=TRUE)
    lo.lin = -3 + .5*real.x
    p.lin  = exp(lo.lin)/(1 + exp(lo.lin))
    y.lin  = rbinom(N, 1, prob=p.lin)
    
    mod.lin = glm(y.lin~ord.x, family=binomial)
    summary(mod.lin)
    # ...
    # Coefficients:
    #              Estimate Std. Error z value Pr(>|z|)
    # (Intercept)   -0.1524  1259.3811   0.000    1.000
    # ord.x.L       14.1938  2570.7009   0.006    0.996
    # ord.x.Q       20.2398  3365.8375   0.006    0.995
    # ord.x.C        4.2861  1285.3508   0.003    0.997
    # ord.x^4      -11.9851  3483.0049  -0.003    0.997
    # ...


  [1]: http://stats.stackexchange.com/questions/101511/logistic-regression-and-ordinal-independent-variables/101556#comment197321_101513