graham23s Posted December 22, 2007 Share Posted December 22, 2007 Hi Guys, when a user egisters on my site i wanted an email also to be sent to myself i did this: $to = ($email,"[email protected]"); and $to = ("$email","[email protected]"); but both times i get an error: syntax error, unexpected ',' i thought that was a valid piece of code have i missed something out? cheers Graham Link to comment https://forums.phpfreaks.com/topic/82845-solved-email-string-problem/ Share on other sites More sharing options...
corillo181 Posted December 22, 2007 Share Posted December 22, 2007 $to = ($email,"[email protected]"); $to = ("$email","[email protected]"); why you have them inside ()? it's telling you that the comma doesn't belong outside the quotes. Link to comment https://forums.phpfreaks.com/topic/82845-solved-email-string-problem/#findComment-421323 Share on other sites More sharing options...
graham23s Posted December 22, 2007 Author Share Posted December 22, 2007 doh thanks mate Link to comment https://forums.phpfreaks.com/topic/82845-solved-email-string-problem/#findComment-421325 Share on other sites More sharing options...
Jessica Posted December 22, 2007 Share Posted December 22, 2007 You should use BCC or send two different emails, so they don't see your email address. Link to comment https://forums.phpfreaks.com/topic/82845-solved-email-string-problem/#findComment-421334 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.