You need to speak with each wallet through it's JSON RPC API. To speak with the wallet you need to write some code.
If you want to test this api go to your wallet in the menu Help->Debug->Console and write the 'help' command, it will give you the list of all the available commands.
To enable this RPC for external applications you need to create a .conf
file. Try to run the wallet from the command line and it should complain that you must create this file. This file contains the credentials that external applications use to access the json-rpc api of the wallet. This is different than the password that you need in order to send the coins.
There are some security considerations that you need to keep in mind:
by default the JSON RPC calls are transmitted in plain text so you need to enable encryption explicitly
minimize the amount of coins you have in the server hot wallet. Instead use one external script to replenish the wallet as needed (also it could compare the addresses in the database with the amount spent)
set the credentials for the wallet access in a secure way