
April 4th, 2004, 04:08 PM
|
|
|
|
Join Date: Apr 2007
Location: Toronto, Canada
Posts: 45
Time spent in forums: < 1 sec
Reputation Power: 2
|
|
|
Adding email addresses to a field
I have this statement in my code:
php Code:
Original
- php Code |
|
|
|
for ($i = 0; $i < $numEmail; $i++) { echo " <a href="#" onClick="document.mail.to.value+=' ".$emailAddresses[$i]." '">$ }
Here is my script... http://www.deepmultimedia.com/~rowenaz/email/user_mail.php
I need to be able to add commas after each email address. The problem is, I need to make an if statement that will ensure that if the "to" field is empty, the script will output the email address in the field... but if the field is not empty (already has an email address) then it will output ", email@email.com".
So it looks like:
without beginning comma--> e@m.com, e@m.com
Right now, I separate using spaces, but I need to find out how to separate the email addresses with commas. Please help.
|