Quote (nuvo @ 5 Mar 2017 21:16)
That code should work. Are you getting errors?
it wont grab the email from the function above.
It will execute, but if i select $Type 'A' it should email to the specified email address in the return, which it does not.
Also, if i select a different $Type, it will execute but no email will be sent.
if i change $to to hard code, any given email address for instance, it will work and send the email. Which is why i am confused
Quote (carteblanche @ 5 Mar 2017 21:16)
are you saying "user" is not a unique column so you can have multiple users with the same name? if that's the case, you have two solutions:
1) if it's supposed to only have 1 email per user, then use a surrogate key (eg: user_id) and pass in user_id instead of name
2) if you want to let the user have multiple emails, it's a functional question, not a technical one. perhaps you can let the user pick which email to use?
by surrogate do you mean create a specific variable for each email address? currently there are 200 users each with a unique email. The program is supposed to simulate an ATM that emails you when you have either deposited or withdrew $
This post was edited by diehard20 on Mar 5 2017 07:31pm