implemented mysqli up to redirect