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 June 7th, 2006, 01:49 PM
Registered User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to DJmoYst
Default 2 sets of Checkboxes

I am trying to crerate a form with two sets of check boxed. i can get them to print with:
$email = _POST['email']
$a[blue]=$_POST['a'];
foreach ($a as $aname )
{
echo "$aname";
}

$b=$_POST['b'];
foreach ($b as $bname)
{
echo "$bname";
}

but in need them to mail to me and to echo in a table when submitted like this:

$formsent = mail("[email protected]","Submition Results",
"Email: $email\r\n
Selections set 1: $aname\r\n
Selections set 2: $bname",
"From: $email\r\mBounce-to: [email protected]");

if($formsent) {
echo"
<table>
<tr><td colspan='2'>Selections</td></tr>
<tr><td>Set 1</td><td>$aname</td></tr>
<tr><td>Set 2</td><td>$bname</td></tr>
</table>";

this is the form i am using for an example
<form name="form1" method="post" action="php.php">
Email
  <input type="text" name="email"><br>

Select all that apply<br>
<input type="checkbox" name="a[]" value="opt 1">opt 1<br>

<input type="checkbox" name="a[]" value="opt 2">opt 2<br>

<input type="checkbox" name="a[]" value="opt 3">opt 3<br><br>
Select all that apply<br>

<input type="checkbox" name="b[]" value="opt a">opt a<br>

  <input type="checkbox" name="b[]" value="opt b">opt b<br>

  <input type="checkbox" name="b[]" value="opt c">opt c<br>

<input type="submit" name="Submit" value="Submit">

</form>

S.K





Similar Threads
Thread Thread Starter Forum Replies Last Post
issue with data sets kaliaparijat ASP.NET 2.0 Professional 1 June 22nd, 2008 11:14 AM
Joining two node sets dubloons XSLT 6 August 27th, 2007 04:03 PM
Correlation sets jsfitter Biztalk 0 March 4th, 2005 12:03 PM





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