Hide my email address in this php file

January 11, 2011 at 16:41:54
Specs: Windows XP, 3.00GHZ/3.25GB
Hello,

I have the following code in a php file communicating with a contact form on a webpage, what i want to do is to hide my e-mail address in the php file so it some what prevents spam bots finding my address. Does anyone know what code i need to change?? Many thanks.



<?php

$EmailTo = "info@beechroofing.com";

$Subject = "Contact From The Website!";

$EmailFrom = Trim(stripslashes($_POST['full_name']));

$email_address = Trim(stripslashes($_POST['email_address']));

$tel_number = Trim(stripslashes($_POST['tel_number']));

$day = Trim(stripslashes($_POST['day']));

$month = Trim(stripslashes($_POST['month']));

$year = Trim(stripslashes($_POST['year']));

$start_time = Trim(stripslashes($_POST['start_time']));

$end_time = Trim(stripslashes($_POST['end_time']));
$event_type = Trim(stripslashes($_POST['event_type']));
$venue = Trim(stripslashes($_POST['venue']));
$music = Trim(stripslashes($_POST['music']));
$guests = Trim(stripslashes($_POST['guests']));
$additional_info = Trim(stripslashes($_POST['additional_info']));
$hear_about_us = Trim(stripslashes($_POST['hear_about_us']));


$validationOK=true;

if (Trim($full_name)=="") $validationOK=false;

if (Trim($email_address)=="") $validationOK=false;

if (Trim($tel_number)=="") $validationOK=false;

if (Trim($day)=="") $validationOK=false;

if (!$validationOK) {

print "<meta http-equiv=\"refresh\" content=\"0;URL=goback.htm\">";

exit;

}

$Body = "";

$Body .= "Full Name: ";

$Body .= $full_name;

$Body .= "\n";

$Body .= "E-Mail Address: ";

$Body .= $email_address;

$Body .= "\n";

$Body .= "Tel Number: ";

$Body .= $tel_number;

$Body .= "\n";

$Body .= "Day: ";

$Body .= $day;

$Body .= "\n";

$Body .= "Month: ";

$Body .= $month;

$Body .= "\n";

$Body .= "Year: ";

$Body .= $year;

$Body .= "\n";

$Body .= "Start Time: ";

$Body .= $start_time;

$Body .= "\n";

$Body .= "End Time: ";

$Body .= $end_time;

$Body .= "\n";
$Body .= "Event Type: ";

$Body .= $event_type;

$Body .= "\n";
$Body .= "Venue: ";

$Body .= $venue;

$Body .= "\n";
$Body .= "Music Expectations: ";

$Body .= $music;

$Body .= "\n";
$Body .= "Guests: ";

$Body .= $guests;

$Body .= "\n";
$Body .= "Additional Info: ";

$Body .= $additional_info;

$Body .= "\n";
$Body .= "Hear About Us: ";

$Body .= $hear_about_us;

$Body .= "\n";

$success = mail($EmailTo, $Subject, $Body, "From: <$Email>");

if ($success){

print "<meta http-equiv=\"refresh\" content=\"0;URL=thanks.htm\">";

}

else{

print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";

}

?>


See More: Hide my email address in this php file

Report •


#1
January 11, 2011 at 18:58:31
You need to: Get a better spam filter.

Report •

#2
January 11, 2011 at 19:01:07
Er...this is an email?

You want to hide the FROM email on the recipient copy???

the email address isn't on the client-side...


Report •

Related Solutions


Ask Question