This code looks exactly like someone who is trying to write VHDL as if it was a programming language, rather than a hardware description language.
I highly suggest you take a step back and start again. Before you write any code, draw, on a peice of paper, the circuit you are trying to create. Once you are pretty confident of this, only then come back and write the VHDL. VHDL is a Hardware Description Language, and unless you know what circuit you want, how do you expect to describe it?
You may want to find a book on Digital logic design using VHDL - those one is highly recommended
http://www.amazon.com/designers-guide-edition-systems-silicon/dp/0120887851