Content Empty in the Contact Form

the mail() function

Moderators: egami, macek, gesf

Post Reply
rupali
New php-forum User
New php-forum User
Posts: 140
Joined: Thu Oct 13, 2011 10:32 pm
Location: Chandigarh, INDIA

Fri Jan 06, 2012 5:42 am

<?php
$Name = trim($Name);
$Name .= stripslashes($Name);
$Email = trim($Email);
$Email .= stripslashes($Email);
$Phone = trim($Phone);
$Phone .= stripslashes($Phone);
$Message = trim($Message);
$Message .= stripslashes($Message);
$Body = $Message . "\n\n" . $Name . "\n" . $Phone;

$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= 'From: '. $from . "\r\n";

mail("hola@email.com","Hi Gorgeous!",$Body,$headers);
?>

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests