[insert_php]
$date=date(‘d-M-Y’);
$name = $_POST[‘user_name’]; // required
$email = $_POST[’email’]; // required
$phone = $_POST[‘phone’]; // required
$company = $_POST[‘company’]; // not required
$institute = $_POST[‘institute’]; // not required
$education = $_POST[‘education’]; // not required
$product = $_POST[‘product’]; // required
$city = $_POST[‘city’]; // required
$further_communication = $_POST[‘further_communication’]; // required
$source = $_POST[‘source’]; // required
$medium = $_POST[‘medium’]; // required
$campaign = $_POST[‘campaign’]; // not required
$gclid = $_POST[‘gclid’]; // required
$term = $_POST[‘term’]; // not required
$csegment = $_POST[‘csegment’]; // required
$content = $_POST[‘content’]; // required
$wb_title = $_POST[‘webinar_title’]; // required
$url = $_POST[‘webinar_URL’]; // required
$email_subject = “[“.$product.”]: New Internship Registration”;
$email_message = “New Internship Registration\n\n”;
$email1 = “mailchimp.blb8s@zapiermail.com”; // required

$needle = ‘-‘;
$result = substr($product, 0, strpos($product, $needle));
if(isset($_POST[’email’]))

{
if($product==”intern” && $further_communication==”contactme”)
{
$email_subjects = “Thank you for your interest in Digital Marketing Internship.”;
$email_messages = “Dear $name,

Thank you for your interest in our Internship Program! We will contact you soon.

You can start learning Digital Marketing by signing up for our upcoming Free Wed Webinar at http://www.digitalvidya.com/webinars/

Best wishes,
Team Digital Vidya”;
$email1 .=”, internship@digitalvidya.com”;
print ”

Thank You!

Thank you for your interest in our Internship Program! We will contact you soon.
You can start learning Digital Marketing by signing up for our upcoming Free Wed Webinar at http://www.digitalvidya.com/webinars/.”;
}

}
$email_message .= “date_var(“.$date.”)\n”;
$email_message .= “name_var(“.$name.”)\n”;
$email_message .= “email_var(“.$email.”)\n”;
$email_message .= “phone_var(“.$phone.”)\n”;
$email_message .= “education_var(“.$education.”)\n”;
$email_message .= “product_var(“.$product.”)\n”;
$email_message .= “url_var(“.$url_link.”)\n”;
$email_message .= “title_var(“.$wb_title.”)\n”;
$email_message .= “city_var(“.$city.”)\n”;
$email_message .= “fc_var(“.$further_communication.”)\n”;
$email_message .= “source_var(“.$source.”)\n”;
$email_message .= “medium_var(“.$medium.”)\n”;
$email_message .= “campaign_var(“.$campaign.”)\n”;
$email_message .= “gclid_var(“.$gclid.”)\n”;
$email_message .= “term_var(“.$term.”)\n”;
$email_message .= “csegment_var(“.$csegment.”)\n”;
$email_message .= “content_var(“.$content.”)\n”;
$email_message .= “country_var(“.getCountryNameShort().”)\n”;
$headers = ‘From: Digital Vidya ‘ . “\r\n” .
‘Reply-To: internship@digitalvidya.com’ . “\r\n” .
‘X-Mailer: PHP/’ . phpversion();

if($product==”intern” && $further_communication==”contactme”)
{
mail($email,$email_subjects,$email_messages, $headers);
}

if(wp_mail($email1,$email_subject,$email_message, $headers))
{
print “”;
}
else
{
print “We are sorry. There is some problem in collecting your details. You can contact us at internship@digitalvidya.com”;
}

[/insert_php]