Store IP address in database