Jump to content

Checkboxes Form


gum1982

Recommended Posts

 

Hi Guys

 

Ive got a form as follows,

<form  method="post" action="<?php bloginfo("template_url"); ?>/process-discounted.php">
       <table width="320" border="1">
  <tr>
    <td><input type="checkbox" class="small" value=".co.uk" name="dom[]" />.co.uk</td>
    <td><input type="checkbox" class="small" value=".com" name="dom[]" />.com</td>
    <td><input type="checkbox" class="small" value=".org" name="dom[]" />.org</td>
    <td><input type="checkbox" class="small" value=".org.uk" name="dom[]" />.org.uk</td>
  </tr>
  <tr>
    <td><input type="checkbox" class="small" value=".net" name="dom[]" />.net</td>
    <td><input type="checkbox" class="small" value=".tv" name="dom[]" />.tv</td>
    <td><input type="checkbox" class="small" value=".biz" name="dom[]" />.biz</td>
    <td><input type="checkbox" class="small" value=".mobi" name="dom[]" />.mobi</td>
  </tr>
  <tr>
    <td><input type="checkbox" class="small" value=".me" name="dom[]" />.me</td>
    <td><input type="checkbox" class="small" value=".me.uk" name="dom[]" />.me.uk</td>
    <td><input type="checkbox" class="small" value=".eu" name="dom[]" />.eu</td>
    <td><input type="checkbox" class="small" value=".info" name="dom[]" />.info</td>
  </tr>
</table>
	<p> 
		<input class="submit" type="submit" id="submit" name="submit" value="submit"/> 
	</p>  
</fieldset> 
</form>  

 

This is my process.php

$aDoor = $_POST['dom'];

$N = count($aDoor);

for($i=0; $i < $N; $i++)
    {
      $domains = ($aDoor[$i] . " ");
    }

include "MIME.class";

$to = '[email protected]'; 
$str = "Domains ".date('M Y', time());

$html_data = '<html lang="en">
<head>
<title>Template 2 :: Versatile Newsletter</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" bgcolor="#F0F0F0">
<table cellpadding="0" cellspacing="0" width="720" align="center">
    <tr>
    <td width="250">Domains:</td>
    <td width="250">'.$domains.'</td>
  </tr>
</table> 
<br />
<br><br></td></tr>
</table>
</td></tr></table><!-- end wrapper table-->	
</body>
</html>'; 


$mime = new MIME_mail("Discounted Hosting", $to, $str);
$mime->attach($html_data, "", HTML, BASE64);
$mime->send_mail();



}

?>

 

This echos out the boxes checked which is fine but i need to send all the values in a email. how can i send these value in the email currently i only always get one value i need them to be broken up.

 

any help please

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/193040-checkboxes-form/
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.