About texture mapping

I’m a true beginner,and I try to map a bmp image to the 3d space.My codes is as belows:

glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);/* Force 4-byte alignment */
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
glTexImage2D(GL_TEXTURE_2D, 1, GL_RGB8,width,
height, 0, GL_RGB, GL_UNSIGNED_BYTE, bits);
glEndList();

where bits stands for the RGB(8bits each)picture pointer,and width and height is the size of the picture,but all I get is nothing but white texture.
I don’t know whether the parameters I chose is incorrect,thanks for your help.

NO WAR!

Did you use glGenTextures and glBindTexture before this code?

try glBindTexture(GL_TEXTURE_2D,myTexture)
where myTexture is an unsigned int.

you also have to enable texture mapping with glEnable(GL_TEXTURE_2D)