0

Hi frnds..
This is Kishore,i need the code of posting the values of selected checkbox to the mail.
So,plz send the code asap.

here i am attaching the two files plz verify it and send the correct code without bugs.

File Names:

1.request.php
2.requestsubmit.php

Thanking You...
Kishore

Attachments
<?php
session_start();
?>
<HTML>
<HEAD>
<title></title>

<meta name="keywords" content="">

<meta name="description" content="web developers usa, web developers India, web developers hyderabad, web developers UK, website developers usa, website 
developers india,website developers hyderabad,website developers UK, india payment gateway, payment gateway solutions from hyderabad, 
payment gateway India, flash presentations, webdesigners address hyderabad, webdesigners address india ,webdesigners address USA, webdesigners address UK, professional freelance web designers hyderabad, professional freelance web designers india, 
professional freelance web, designers USA, professional freelance web designers UK,professional freelance web design india, professional freelance web design USA, professional freelance web design USA, professional freelance web design UK,indian web 
developers, USA web developers, Hyderabad web developers, UK web developers,website designers india, website designers Hyderabad, website designers USA, website designers UK,/">

<META content="bitranet.com" name="BItraNet">
<meta name="www.bitranet.com" CONTENT="http://www.bitranet.com">
<meta name="rating" CONTENT="General">
<meta name="ROBOTS" CONTENT="ALL,INDEX,FOLLOW">
<meta name="revisit-after" CONTENT="6 days">
<META content="English" name="language">
<META content="index,follow" name="robots">

<script language="JavaScript" type="text/JavaScript" src="website_design_javascript.js"></script>
<link href="website_development_stylesheet.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.noborder{font-size:18px;font-family:Verdana, Arial, Helvetica, sans-serif;border-bottom: #ffffff 0px solid;border-top: #ffffff 1px solid;border-left: #ffffff 1px solid;border-right: #ffffff 0px solid;COLOR: #000000}
.style21 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style25 {font-size: 12px}
.style27 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }
.style28 {color: #000000}
.style29 {font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000;}
.style30 {color: #FF0000}
-->
</style>
</HEAD>
<BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="return focuson();">



<?php

   if(isset($_REQUEST['Submit'])){
      $key=substr($_SESSION['key'],0,5);
      $number = $_REQUEST['number'];
      if($number!=$key){
          echo '<center><font face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000">
		   Validation string not valid! Please try again!</font></center>';}
      else{
           echo '<center><font face="Verdana, Arial, Helvetica, sans-serif"  color="#66CC00">
		    Your string is valid!</font></center>';} 
     }
?>
<TABLE WIDTH=775 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
  <TR>
   
    <TD width="760" align="left" valign="top" bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        
        <tr>
          <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
             
              <td width="577" align="left" valign="top">                <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    
                    <tr>
                      
                    <tr>
                            <td align="left" valign="top">
<SCRIPT>//global variable for error flag
var errfound = false;
//function to validate by length
function ValidLength(item, len) {
   return (item.length >= len);
}
//function to validate an email address
function ValidEmail(item) {
   if (!ValidLength(item, 5)) return false;
   if (item.indexOf ('@', 0) == -1) return false;
   
   return true;
}
// display an error alert
function error(elem, text) {
// abort if we already found an error
   if (errfound) return;
   window.alert(text);
   elem.select();
   elem.focus();
   errfound = true;
}
// main validation function
function Validate() {
   errfound = false;
   if (!ValidLength(document.form.company.value,1))
      error(document.form.company,"Enter Your Company Name");
	if (!ValidLength(document.form.city.value,1))
      error(document.form.city,"Enter Your City Name");
	  if (!ValidLength(document.form.state.value,1))
      error(document.form.state, "Enter Your State Name");
	  if (!ValidLength(document.form.country.value,1))
      error(document.form.country, "Enter Your Country Name");
	  if (!ValidLength(document.form.name.value,1))
      error(document.form.name, "Enter Your Name");
	  
	   if (!ValidEmail(document.form.email.value,1))
      error(document.form.email,"Enter Your Email Id");
      if (!ValidLength(document.form.phone.value,1))
      error(document.form.phone,"Enter Your Phone Number");
	 
	   if (!ValidLength(document.form.search1.value,1))
      error(document.form.search1,"Enter Search engine Name");
	   if (!ValidLength(document.form.number.value,5))
      error(document.form.number,"Enter Search engine Name");
	  
	  
	  
	  
      
	  
	  
	  return !errfound; /* true if there are no errors */
}</SCRIPT> <SCRIPT language="javascript">
function Only_Num(id) {
	if(isNaN(document.getElementById(id).value)) {
		alert("Please Enter Numbers Only (0-9)..");
		document.getElementById(id).select();
		document.getElementById(id).value=""
		document.getElementById(id).focus();
	}
	return;
}
function focuson()
  { document.form.number.focus()}

function check()
	{
	if(document.form.number.value==0)
		{	
		alert("enter");	
		document.form.number.focus();
		return false;
		}
	}
</script>                        <form name="form" action="requsetsubmit.php" method="post">
                                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td><table width="100%" border="0" cellspacing="0" cellpadding="5">
                                        <tr>
                                          <td width="33%" class="style10 style21 style25">Company Name <font color="#FF0000">*</font></td>
                                          <td width="3%" class="style10 style21 style25">:</td>
                                          <td width="64%"><input name="company" type="text" class="style29" id="company" size="25" maxlength="75"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">City<font color="#FF0000">*</font></td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input name="city" type="text" id="city" size="20" maxlength="50"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">State / Province<font color="#FF0000">*</font> </td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input name="state" type="text" id="state" size="20" maxlength="50"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">Country <font color="#FF0000">*</font></td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input name="country" type="text" id="country" size="15" maxlength="50"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">Your Name <font color="#FF0000">*</font></td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input name="name" type="text" id="name" size="25" maxlength="75"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">E-Mail <font color="#FF0000">*</font></td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input name="email" type="text" id="email" size="30" maxlength="75"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">Phone<font color="#FF0000">*</font></td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input name="phone" type="text" id="phone" size="15" maxlength="50"onChange="Javascript:LA()"  onKeyUp="Only_Num(this.id)"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">Domain Name Required ...?</td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><span class="style27">
                                            <input name="radiobutton" type="radio" class="style7" value="Yes" checked>
                                            <span class="style28">Yes</span></span>
                                            <span class="style27">
                                            <input name="radiobutton" type="radio" class="style7" value="No">
                                            <span class="style28">No</span></span></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">if Yes provide Domain Name</td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input n
<?
if($_SERVER['REQUEST_METHOD']=='POST'){
$artwork = $_POST['checkbox'];
 $mail_body='<style type=text/css><!--td {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}--></style>
<table width="50%"  border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#E7E7E7">
  <tr>
    <td><table width="100%"  border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
        <input type="hidden" name="contact" value="ok">
        <tr>
          <td colspan="3" align="center" height=35><strong>Contact Details</strong></td>
        </tr>
        <tr>
          <td width="34%">Company</td>
          <td width="3%">:</td>
          <td width="63%">'.$_POST['company'].'</td>
        </tr><tr>
          <td width="34%">City</td>
          <td width="3%">:</td>
          <td width="63%">'.$_POST['city'].'</td>
        </tr>
		<tr>
          <td width="34%">state</td>
          <td width="3%">:</td>
          <td width="63%">'.$_POST['state'].'</td>
        </tr>
		<tr>
          <td width="34%">Country</td>
          <td width="3%">:</td>
          <td width="63%">'.$_POST['country'].'</td>
        </tr>
		<tr>
          <td width="34%">Name</td>
          <td width="3%">:</td>
          <td width="63%">'.$_POST['name'].'</td>
        </tr>
        <tr>
          <td>email </td>
          <td>:</td>
          <td>'.$_POST['email'].'</td>
        </tr>
        <tr>
          <td>phone </td>
          <td>:</td>
          <td>'.$_POST['phone'].'</td>
        </tr>
		 <tr>
          <td>Domain </td>
          <td>:</td>
          <td>'.$_POST['domain'].'</td>
        </tr>
		 <tr>
          <td>Existing </td>
          <td>:</td>
          <td>'.$_POST['existing'].'</td>
        </tr>
		 <tr>
          <td>Services </td>
          <td>:</td>
          <td>
		 
		 '.
		  foreach ($artwork as $selected) {
          $body .= " > ".$selected."\r\n";      
         }.'

		  
		  </td>
        </tr>
		<tr>
          <td>Hosting Space </td>
          <td>:</td>
          <td>'.$_POST['radiobutton1'].'</td>
        </tr><tr>
          <td>Other Requirements </td>
          <td>:</td>
          <td>'.$_POST['others'].'</td>
        </tr>
        <tr>
          <td>Search Engine </td>
          <td>:</td>
          <td>'.$_POST['search1'].'</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
    </table></td>
  </tr>
</table>';
	
	//echo $mail_body;exit;	
	$mailto = 'ex@ex.com' ;	
	$mailto =  'ex@ex.com'  ;
	$mailheader  = 'MIME-Version: 1.0' . "\r\n";
	$mailheader .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";	
	$mailheader.=" From: ".$_POST['email']."\r\n";
	$mailheader .= 'BCc: 'ex@ex.com'  . "\r\n";
		@mail($mailto,'Contact Us Details',$mail_body,$mailheader);		
	echo '<script language="javascript">window.location.href="thanku.html";</script>';	
}

?>
3
Contributors
3
Replies
5
Views
9 Years
Discussion Span
Last Post by saikishore
0

hi sai,
i made modifications it will work fine i have checked it remove echo and exit to mailbody
and use it
thank u

Attachments
<?php
session_start();
?>
<HTML>
<HEAD>
<title></title>

<meta name="keywords" content="">

<meta name="description" content="web developers usa, web developers India, web developers hyderabad, web developers UK, website developers usa, website 
developers india,website developers hyderabad,website developers UK, india payment gateway, payment gateway solutions from hyderabad, 
payment gateway India, flash presentations, webdesigners address hyderabad, webdesigners address india ,webdesigners address USA, webdesigners address UK, professional freelance web designers hyderabad, professional freelance web designers india, 
professional freelance web, designers USA, professional freelance web designers UK,professional freelance web design india, professional freelance web design USA, professional freelance web design USA, professional freelance web design UK,indian web 
developers, USA web developers, Hyderabad web developers, UK web developers,website designers india, website designers Hyderabad, website designers USA, website designers UK,/">

<META content="bitranet.com" name="BItraNet">
<meta name="www.bitranet.com" CONTENT="http://www.bitranet.com">
<meta name="rating" CONTENT="General">
<meta name="ROBOTS" CONTENT="ALL,INDEX,FOLLOW">
<meta name="revisit-after" CONTENT="6 days">
<META content="English" name="language">
<META content="index,follow" name="robots">

<script language="JavaScript" type="text/JavaScript" src="website_design_javascript.js"></script>
<link href="website_development_stylesheet.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.noborder{font-size:18px;font-family:Verdana, Arial, Helvetica, sans-serif;border-bottom: #ffffff 0px solid;border-top: #ffffff 1px solid;border-left: #ffffff 1px solid;border-right: #ffffff 0px solid;COLOR: #000000}
.style21 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style25 {font-size: 12px}
.style27 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }
.style28 {color: #000000}
.style29 {font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000;}
.style30 {color: #FF0000}
-->
</style>
</HEAD>
<BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="return focuson();">



<?php

   if(isset($_REQUEST['Submit'])){
      $key=substr($_SESSION['key'],0,5);
      $number = $_REQUEST['number'];
      if($number!=$key){
          echo '<center><font face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000">
		   Validation string not valid! Please try again!</font></center>';}
      else{
           echo '<center><font face="Verdana, Arial, Helvetica, sans-serif"  color="#66CC00">
		    Your string is valid!</font></center>';} 
     }
?>
<TABLE WIDTH=775 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
  <TR>
   
    <TD width="760" align="left" valign="top" bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        
        <tr>
          <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
             
              <td width="577" align="left" valign="top">                <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    
                    <tr>
                      
                    <tr>
                            <td align="left" valign="top">
<SCRIPT>//global variable for error flag
var errfound = false;
//function to validate by length
function ValidLength(item, len) {
   return (item.length >= len);
}
//function to validate an email address
function ValidEmail(item) {
   if (!ValidLength(item, 5)) return false;
   if (item.indexOf ('@', 0) == -1) return false;
   
   return true;
}
// display an error alert
function error(elem, text) {
// abort if we already found an error
   if (errfound) return;
   window.alert(text);
   elem.select();
   elem.focus();
   errfound = true;
}
// main validation function
function Validate() {
   errfound = false;
   if (!ValidLength(document.form.company.value,1))
      error(document.form.company,"Enter Your Company Name");
	if (!ValidLength(document.form.city.value,1))
      error(document.form.city,"Enter Your City Name");
	  if (!ValidLength(document.form.state.value,1))
      error(document.form.state, "Enter Your State Name");
	  if (!ValidLength(document.form.country.value,1))
      error(document.form.country, "Enter Your Country Name");
	  if (!ValidLength(document.form.name.value,1))
      error(document.form.name, "Enter Your Name");
	  
	   if (!ValidEmail(document.form.email.value,1))
      error(document.form.email,"Enter Your Email Id");
      if (!ValidLength(document.form.phone.value,1))
      error(document.form.phone,"Enter Your Phone Number");
	 
	   if (!ValidLength(document.form.search1.value,1))
      error(document.form.search1,"Enter Search engine Name");
	   if (!ValidLength(document.form.number.value,5))
      error(document.form.number,"Enter Search engine Name");
	  
	  
	  
	  
      
	  
	  
	  return !errfound; /* true if there are no errors */
}</SCRIPT> <SCRIPT language="javascript">
function Only_Num(id) {
	if(isNaN(document.getElementById(id).value)) {
		alert("Please Enter Numbers Only (0-9)..");
		document.getElementById(id).select();
		document.getElementById(id).value=""
		document.getElementById(id).focus();
	}
	return;
}
function focuson()
  { document.form.number.focus()}

function check()
	{
	if(document.form.number.value==0)
		{	
		alert("enter");	
		document.form.number.focus();
		return false;
		}
	}
</script>                        <form name="form" action="requsetsubmit.php" method="post">
                                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td><table width="100%" border="0" cellspacing="0" cellpadding="5">
                                        <tr>
                                          <td width="33%" class="style10 style21 style25">Company Name <font color="#FF0000">*</font></td>
                                          <td width="3%" class="style10 style21 style25">:</td>
                                          <td width="64%"><input name="company" type="text" class="style29" id="company" size="25" maxlength="75"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">City<font color="#FF0000">*</font></td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input name="city" type="text" id="city" size="20" maxlength="50"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">State / Province<font color="#FF0000">*</font> </td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input name="state" type="text" id="state" size="20" maxlength="50"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">Country <font color="#FF0000">*</font></td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input name="country" type="text" id="country" size="15" maxlength="50"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">Your Name <font color="#FF0000">*</font></td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input name="name" type="text" id="name" size="25" maxlength="75"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">E-Mail <font color="#FF0000">*</font></td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input name="email" type="text" id="email" size="30" maxlength="75"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">Phone<font color="#FF0000">*</font></td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input name="phone" type="text" id="phone" size="15" maxlength="50"onChange="Javascript:LA()"  onKeyUp="Only_Num(this.id)"></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">Domain Name Required ...?</td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><span class="style27">
                                            <input name="radiobutton1" type="radio" class="style7" value="Yes" checked>
                                            <span class="style28">Yes</span></span>
                                            <span class="style27">
                                            <input name="radiobutton" type="radio" class="style7" value="No">
                                            <span class="style28">No</span></span></td>
                                        </tr>
                                        <tr>
                                          <td class="style10 style21 style25">if Yes provide Domain Name</td>
                                          <td class="style10 style21 style25">:</td>
                                          <td><input
<?
$artwork =@addslashes($_POST['service']);
$company=$_POST['company'];
$city=$_POST['city'];
$state=$_POST['state'];
$country=$_POST['country'];
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$domain=$_POST['domain'];
$existing=$_POST['existing'];
$others=$_POST['others'];
$search=$_POST['search1'];

$artwork=(!empty($_POST['service'])? array_map('stripslashes',$_POST['service']) : ''); 
 echo $mail_body='<style type=text/css><!--td {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}--></style>
<table width="50%"  border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#E7E7E7">
  <tr>
    <td><table width="100%"  border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
        <input type="hidden" name="contact" value="ok">
        <tr>
          <td colspan="3" align="center" height=35><strong>Contact Details</strong></td>
        </tr>
        <tr>
          <td width="34%">Company</td>
          <td width="3%">:</td>
          <td width="63%">'.$company.'</td>
        </tr><tr>
          <td width="34%">City</td>
          <td width="3%">:</td>
          <td width="63%">'.$city.'</td>
        </tr>
		<tr>
          <td width="34%">state</td>
          <td width="3%">:</td>
          <td width="63%">'.$state.'</td>
        </tr>
		<tr>
          <td width="34%">Country</td>
          <td width="3%">:</td>
          <td width="63%">'.$country.'</td>
        </tr>
		<tr>
          <td width="34%">Name</td>
          <td width="3%">:</td>
          <td width="63%">'.$name.'</td>
        </tr>
        <tr>
          <td>email </td>
          <td>:</td>
          <td>'.$email.'</td>
        </tr>
        <tr>
          <td>phone </td>
          <td>:</td>
          <td>'.$phone.'</td>
        </tr>
		 <tr>
          <td>Domain </td>
          <td>:</td>
          <td>'.$domain.'</td>
        </tr>
		 <tr>
          <td>Existing </td>
          <td>:</td>
          <td>'.$existing.'</td>
        </tr>
		 <tr>
          <td>Services </td>
          <td>:</td>
          <td>
		 
		  '.(is_array($artwork)? implode(",",$artwork) : '').'

		  
		  </td>
        </tr>
				
		
		<tr>
          <td>Other Requirements </td>
          <td>:</td>
          <td>'.$others.'</td>
        </tr>
        <tr>
          <td>Search Engine </td>
          <td>:</td>
          <td>'.$search.'</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
    </table></td>
  </tr>
</table>';
exit;
	
	//echo $mail_body;exit;	
	$mailto = 'ex@ex.com' ;	
	$mailto =  'ex@ex.com'  ;
	$mailheader  = 'MIME-Version: 1.0' . "\r\n";
	$mailheader .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";	
	$mailheader.=" From: ".$_POST['email']."\r\n";
	//$mailheader .= 'BCc: 'ex@ex.com'  '. "\r\n";
		@mail($mailto,'Contact Us Details',$mail_body,$mailheader);		
	echo '<script language="javascript">window.location.href="thanku.html";</script>';	


?>
0

hi sai,
i made modifications it will work fine i have checked it remove echo and exit to mailbody
and use it
thank u

...Hai Praveen iam very thankfull to u.At the right time u helped me.thanks for fast response,its fine working.keep in touch....thanku once again.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.