Hello! Tried to post this a moment ago, but it appears that the post disappeared when I clicked submit... haha, oh well... here goes again...
NOTE: I uploaded a text file with my code in it - hope that will work for you (please see attached).
I'm new (to the forum and to PHP). Just trying to learn PHP at the moment - so, I've written the below script and I've been testing it. Seems to work okay (it's invoked from a standard HTML page that is used to pass ONE field in the invoking URL - and that field is to indicate "which band member" is to get the
email).
In the logic paragraph below (in the attachment) that begins with "if (isset($_REQUEST['email']))" there is something very odd and interesting happening with a field... and I thought you all would be the right people to ask about it.
Now, I realize that this is "server side" stuff...but I still don't understand how the following could be happening... but it is...
So, here is my issue:
You can see how field "recipient" is set immediately upon entering the code... and you can also see how I then make a copy of that value into field $recip. The reason I'm making this copy of the field is so I can "restore" it back into field $recipient after $recipient is clobbered.
I suppose it must be this line that is clobbering $recipient:
mail($senditto, "Subject: $subject$phnlit$phn",
$message, "From: $email" );
Reason I say that: The email that results from this command ALWAYS goes first to jason@domain2.com (the email also always goes (as it should) to bertha@domain3.com)... but the first of the two email addresses that is sent to is ALWAYS jason's email address even when I vary the recipient from invoking page.
I'm baffled. Thought it might make a puzzle for someone here - plus really want to learn what I've done wrong... So, do you know why $recipient is getting clobbered?
Thank you all in advance (and sorry about the long post).
swoop