In your code, you declare GLuint texture[1], an array of one texture handle. You then bind to this uninitialized texture handle on this line:
glBindTexture(GL_TEXTURE_2D, texture[0]);
This is incorrect. You are binding to a texture handle that has not yet been initialized. Instead, what you need to do is generate the texture handle by calling glGenTextures. THEN you may bind to the texture. So try this:
Add this:
glGenTextures(1,&texture[0]);
Before this line:
glBindTexture(GL_TEXTURE_2D, texture[0]);
After calling glGenTextures, your handle (texture[0]) should be a non-zero value.