I am as green as GRASS when it comes to php so please excuse my lack of jargon
I am trying to make the Text appear bold in an email submission
I have a form that gathers the info and then submits it to me and others as an email. I would like some of the text to appear in bold and if possible a color other than black

This is the php code that works so far, how do you make the text in this change color, I suspect there has to be some HTML in here as there is no ability in php to turn text bold as far as I can see, I can't work out how to intigrate it.

<?php
$EmailFrom = stripslashes($_POST['email']);
$EmailTo = "mgcaledonian@mgcaledonian.org";
$Subject = $subject;


// Contents of hidden fields
$subject = Trim(stripslashes($POST['subject']));
$header = Trim(stripslashes($
POST['header']));
$eventdate = Trim(stripslashes($POST['eventdate']));
$mg = Trim(stripslashes($
POST['mg']));

// Contents of form
$name = Trim(stripslashes($POST['name']));
$guest = Trim(stripslashes($
POST['guest']));

$membership = Trim(stripslashes($POST['membership']));
$telephone = Trim(stripslashes($
POST['telephone']));
$address1 = Trim(stripslashes($POST['address1']));
$address2 = Trim(stripslashes($
POST['address2']));
$towncity = Trim(stripslashes($POST['towncity']));
$pcode = Trim(stripslashes($
POST['pcode']));
$centre = Trim(stripslashes($POST['centre']));
$email = Trim(stripslashes($
POST['email']));
$information = Trim(stripslashes($_POST['information']));


// prepare email body text
$Body = "";
$Body .= $header;
$Body .= " on the ";
$Body .= $eventdate;
$Body .= "\n";
$Body .= "_______________________________________________________________________";
$Body .= "\n";
$Body .= "Please add ";

$namelwr = strtolower($name);
$Body .= ucwords($namelwr);
$guestlwr = strtolower($guest);

if ($guestlwr>" ")
{
$Body .= " and ";
$Body .= ucwords($guestlwr);
}
else
$Body .= "";

$Body .= " to the ";
$Body .= $subject;
$Body .= " list of bookings";
$Body .= "\n";
$Body .= "_______________________________________________________________________";
$Body .= "\n";
$Body .= " A Confirmation has been sent to ";
$Body .= ucwords($namelwr);

$Body .= "'s email address";
$Body .= "\n";
$Body .= "____________________________________________________________________";
$Body .= "\n";
$Body .= "INFORMATION: ";
$Body .= "\n";
$Body .= $information;
$Body .= "\n";
$Body .= "
____________________________________________________________________";
$Body .= "\n";
$Body .= "Name : ";

$namelwr = strtolower($name);
$Body .= ucwords($namelwr);

$Body .= "\n";
$Body .= "Partner/Guest : ";
//$Body .= ucwords($guest);

$guestlwr = strtolower($guest);
$Body .= ucwords($guestlwr);


$Body .= "\n";

$Body .= "Membership No : ";
$Body .= $membership;
$Body .= "\n";
$Body .= "Contact Tel No : ";
$Body .= $telephone;

$Body .= "\n";
$Body .= "Centre : ";
$Body .= $centre;
$Body .= "\n";
$Body .= "E-mail : ";
$Body .= $email;
$Body .= "\n";
// Control hidden field
$Body .= $mg;

// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=../ok_files/ok-general.htm\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>

    you have to send html formatted mail if you want colour etc, look at example 4 on the mail() page

      Write a Reply...