Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Assign Multiple Members To A Group

DZone's Guide to

Assign Multiple Members To A Group

·
Free Resource
Assign multiple members pulled from a db table to a group.


  





  

Group List: "; $query2 = "SELECT address, group_id FROM members"; $result1 = mysql_query($query2); echo "

Member List: "; echo "

"; if ($_GET['a'] == 'add_members2group') { $group_id = $_POST['group_id']; $address_count = count($_POST['address']); $values = $_POST['address']; foreach( $_POST['address'] as $address) { $query = "UPDATE ".MYSQL_TBL_MAILLIST_SUBSCRIBERS." SET group_id='$group_id' WHERE address='$address'"; $result = mysql_query($query) or die("Error: ".mysql_error()); } echo "

$address_count Members have been added.

"; } ?>

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}