Why dont you use a php script on your server which has access to the sqldatabase?
Much easier and secure for me