Jump to content

help with code.


seany123

Recommended Posts

im trying to make a mass mail page wher i can mass mail everyone but im not too sure how to do it...

 

this is what i would do to message 1 person.

 

$query = $db->execute("insert into `mail` (`to`, `from`, `body`, `subject`) values (?, ?, ?, ?)", array($insert['to'], $insert['from'], $insert['body'], $insert['subject']));

 

the members are stored in member table

 

so basically what i think  need to do is:

 

$query = $db->execute("SELECT id FROM members");

$member = $query->fetchrow(){

$query = $db->execute("insert into `mail` (`to`, `from`, `body`, `subject`) values (?, ?, ?, ?)", array($member, $insert['from'], $insert['body'], $insert['subject']));

}

 

is that right?

 

Link to comment
https://forums.phpfreaks.com/topic/190906-help-with-code/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.