Page 1 of 1

Email Code help

Posted: Wed Jul 29, 2009 6:12 am
by hhosurfer
Sorry all I have just begun to understand some of php coding and need a quick answer. While digging into my companies website I read a code in the PHP send email script. I know $recipients= is who gets that email. but what does the //" mean. is that a carbon copy? Need help. As follows:

<?php
$recipients = "someone@email.com,someonceelse@email.net";
//"friend@zmail.com,friend2@zmail.com,someoneelse@email.net"

/*function valid_email($email){
if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", trim($email)))
return 0;
else
return 1;
}

/process submission
------------------------------------------

Re: Email Code help

Posted: Wed Jul 29, 2009 6:17 am
by dejvos
// = comment -> rest of line after this will not be executed.

Re: Email Code help

Posted: Wed Jul 29, 2009 6:24 am
by hhosurfer
So why is it there?

Re: Email Code help

Posted: Wed Jul 29, 2009 7:07 am
by hhosurfer
anyone?

Re: Email Code help

Posted: Wed Jul 29, 2009 7:28 am
by jackpf
How would we know? Ask whoever coded it.