Hi,
well.. look at the
Indy components. The Idhttp component should be able to do all what you want.
In short, it is to build the initial http - Request to get the login-form from the server, then you can fill out the controls (username, password) and send a login-request. After that you need to put all the steps you would manually do in myphpadmin into code handling the answers from the idhttp component.
I guess we have some hints here in the forum, but I fear all in german.