Transfer data to and from web site

Transfer data to and from web site

Can someone help with some logic please

This is all an example of what I am trying to do

So my web site has a line that says "hello I am a x"

On my database I have the following fields

Number

Hello I am a

Code in on user input in Number is

if(input.Number  =  1)
{
input.Hello_I_am_a ="Dog";
}
if(input.Number  =  2)
{
input.Hello_I_am_a ="Cat";
}
if(input.Hello_I_am_a  =  "")
{
Number=1;
}
if(input.Number  =  3)
{
input.Hello_I_am_a="Mouse";
}
if(input.Hello_I_am_a  =  "")
{
Number=1;
}
if(input.Number  =  4)
{
Hello_I_am_a ="";
}
if (input.input.Hello_I_am_a  =  "")
{
Number=1;
}



Code on on edit load is 

temp=input.Number;
temp=(temp  +  1);
Number=temp;

The code works, when you edit the database changes the animal.

What I am trying to achieve is every time someone goes into the web site they will get a different animal.

Hope this makes sense.