Dynamic texture loading

Please, send me simple function, which loads and INITs a texture of different size (Before running program we not know texture resolution!)!

And this is posted on the advanced OpenGL message board becauseā€¦ ?
http://nehe.gamedev.net/ should keep you going for a while.