Wrox Programmer Forums
|
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 29th, 2006, 08:49 PM
eda eda is offline
Registered User
 
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default send message to many recipients

hi all...
i need to make one form that enable administrator to send message to many recipients. im using php and mysql.that means the recipients will recieve the same message. anyone could help me?

thanks ya....

here is the form
(1)
<? //form.php ?>

<form action="send.php" method="post">
<?php
if (isset($_POST['move']))
{ ?>
To: <textarea name="reci" cols="50" rows=""><? echo "" . join(', ', $_POST['move']) . ".\n"; ?></textarea>
<? }
echo "<br />\n";
echo "<a href=\"form1.php\">Insert Address</a>\n";
?><br>
Message: <textarea name="mesej" cols="" rows=""></textarea>
<input type="submit" name="Submit" value="Send">
</form>
***************************
(2)
<? //form1.php ?>
<script>
<!--
    function selectAll(f,n,v) {
        var chk = ( v == null ? true : v );
        for (i = 0; i < f.elements.length; i++) {
            if( f.elements[i].type == 'checkbox' &&
f.elements[i].name == n ) {
                f.elements[i].checked = chk;
            }
        }
    }
//-->
</script>
<?php
  $link = mysql_connect("localhost","root","");
  $database = mysql_select_db("test");

 //include 'function.php';
?>
<?
$q = mysql_query("select * from test1");
while($d = mysql_fetch_array($q)){
//}
?>
<form method="post" action="form.php" name="myform">
  <input type="checkbox" name="move[]" value="<? echo $d[email];?>"><? echo $d[email];?></input><br/>
  <? } ?>
  <input type="submit" value="insert checked contacts" />

<input type="button" onClick="selectAll(this.form,'move[]')" name="butt"
value="select all">
<input type="button" onClick="selectAll(this.form,'move[]',false)"
name="butt" value="unselect all"></form>
</body>
</html>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Send e-mails to multiple recipients using database misskaos Classic ASP Basics 6 October 17th, 2006 11:09 PM
Send email using CDO, multiple recipients for DSN? Mattallyc Classic ASP Professional 7 October 2nd, 2006 10:43 AM
Send Message to Email inbaa ASP.NET 1.0 and 1.1 Professional 2 August 28th, 2006 05:45 AM
Send mail to multiple recipients...it hurts sherbir Servlets 1 September 24th, 2004 01:04 PM
How to send message to SMS !!!!! stevenThu Classic ASP Professional 4 August 26th, 2004 10:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.