TestPage

 

if ( isset( $_POST['submit'] ) ) {
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$Phone_number=$_POST['Phone_number'];
$Address=$_POST['Address'];
$testcombo=$_POST['testcombo'];

/* child information 1*/
$Firstname_hide1=$_POST['Firstname_hide1'];
$Lastname_hide1=$_POST['Lastname_hide1'];
$male1=$_POST['male1'];
$female1=$_POST['female1'];
$DOB1=$_POST['DOB1'];
/* end */
/* child information 2*/
$Firstname_hide2=$_POST['Firstname_hide2'];
$Lastname_hide2=$_POST['Lastname_hide2'];
$male2=$_POST['male2'];
$female2=$_POST['female2'];
$DOB2=$_POST['DOB2'];
/* end */

/* child information 3*/
$Firstname_hide3=$_POST['Firstname_hide3'];
$Lastname_hide3=$_POST['Lastname_hide3'];
$male3=$_POST['male3'];
$female3=$_POST['female3'];
$DOB3=$_POST['DOB3'];
/* end */
/* child information 4*/
$Firstname_hide4=$_POST['Firstname_hide4'];
$Lastname_hide4=$_POST['Lastname_hide4'];
$male4=$_POST['male4'];
$female4=$_POST['female4'];
$DOB4=$_POST['DOB4'];
/* end */
/* child information 5*/
$Firstname_hide5=$_POST['Firstname_hide5'];
$Lastname_hide5=$_POST['Lastname_hide5'];
$male5=$_POST['male5'];
$female5=$_POST['female5'];
$DOB5=$_POST['DOB5'];
/* end */

$to = "prasad@verdant.co.in";
$subject = 'Test Mail';
$body ="";
$body .="



Firstname: $firstname

Lastname: $lastname

Phone number: $Phone_number

Address: $Address



“;
if($testcombo==1 || $testcombo==2 || $testcombo==3 || $testcombo==4 || $testcombo==5)
{
$body .=”


Child information

Child Firstname: $Firstname_hide1

Child Lastname: $Lastname_hide1

“;
if($male1==’male’)
{
$body .=”

Gender: $male1

“;
}
else
{
$body .=”

Gender: $female1



“;
}
}
/* end */
if($testcombo==2 || $testcombo==3 || $testcombo==4 || $testcombo==5)
{
$body .=”


Child information

Child Firstname: $Firstname_hide2

Child Lastname: $Lastname_hide2

“;
if($male2==’male’)
{
$body .=”

Gender: $male2

“;
}
else
{
$body .=”

Gender: $female2



“;
}
}
/* end */
if($testcombo==3 || $testcombo==4 || $testcombo==5)
{
$body .=”


Child information

Child Firstname: $Firstname_hide2

Child Lastname: $Lastname_hide2

“;
if($male2==’male’)
{
$body .=”

Gender: $male2

“;
}
else
{
$body .=”

Gender: $female2



“;
}
}
/* end */
if($testcombo==4 || $testcombo==5)
{

$body .=”


Child information

Child Firstname: $Firstname_hide4

Child Lastname: $Lastname_hide4

“;
if($male4==’male’)
{
$body .=”

Gender: $male4

“;
}
else
{
$body .=”

Gender: $female4



“;
}
}
if($testcombo==5)
{
$body .=”


Child information

Child Firstname: $Firstname_hide5

Child Lastname: $Lastname_hide5

“;
if($male5==’male’)
{
$body .=”

Gender: $male5

“;
}
else
{
$body .=”

Gender: $female5



“;
}
}
$headers = ‘From: Test’ . “\r\n”;
$headers .= “Content-type: text/html”;
$Emails=mail($to, $subject, $body, $headers);
if($Emails)
{
echo ‘Message Sent Successfully';

}
else
{
echo ‘oh No something problem on my server';
}
}
?>