Use a library such as phplib (linked from the php.net site under projects) and connections will be easier to handle. If you haven't done much work with either php or oracle, you need to expect a steep learning curve and not expect answers to all your problems from anyone but yourself.