如何使用PHP向多个用户发送消息

时间:2017-04-14 05:19:09

标签: php html5 css3

我正在使用PHP Messaging系统在用户之间发送消息。但我的问题是,如何在new_pm.php中向多个用户发送消息。

http://www.webestools.com/scripts_tutorials-code-source-15-personal-message-system-in-php-mysql-pm-system-private-message-discussion.html

$dn1 = mysqli_fetch_array($conn->query('select count(id) as recip, id as 
recipid, (select count(*) from pm) as npm from registrationform where 
email="'.$recip.'" '));

if($conn->query('insert into pm (id, id2, title, user1, user2, message, 
timestamp, user1read, user2read)values("'.$id.'", "1", "'.$title.'", 
"'.$id1.'", "'.$dn1['recipid'].'", "'.$message.'", "'.time().'", "yes", 
"no")'))

1 个答案:

答案 0 :(得分:-1)

伪代码:

以用户
身份使用user2array 执行插入查询,但对于user2列,请将该值替换为收件人用户ID。

id2列是什么?我不确定。也许你可以搞清楚。