Why does your 1999 Nissan maxima security light flashes when ignition is offthen goes solid on with ignition on and while crankingand car will not start?

I forgot to tell you after you connect the battery with the key in start position try to start the car after you reconnect the battery