Jump to content

Help With PHP Form!


Sethers

Recommended Posts

Alright, I have collected different elements to make a fporm using PHP. No databases are used so what you see is what you get. It's working perfectly and quickly, exept when I recieve the email, the font is not what I want it to be.

 

Let me explain:

 

<html>

<style type="text/css">
p.sample {
font-family: verdana;
font-size: small;
}
</style>





<head><meta http-equiv="refresh" content="0;URL=http://www.coco-chanel.co.uk/index.php"></head><body><?php

$mymail = 'uttermaniac@aol.com';
$cc = 'Coco-Chanel Form Response!';
$BoDy = ' ';
$FrOm = 'FROM:' .$_POST['t1'];
$FrOm .= 'Reply-To:' .$_POST['t1'];
$FrOm .= 'X-MAILER: PHP'.phpversion();
$BoDy .= '<font face="Verdana" size="1" color="#FF82A5"><b>Name: </b></font>';
$BoDy .= $_POST['t1'];
$BoDy .= "\n";
$BoDy .= '<font face="Verdana" size="1" color="#FF82A5"><b>Email: </b></font>';
$BoDy .= $_POST['t2'];
$BoDy .= "\n";
$BoDy .= '<font face="Verdana" size="1" color="#FF82A5"><b>Comments:</b></font> ';
$BoDy .= $_POST['t3'];
$BoDy .= "\n";
$send = mail("$mymail", "$cc", "$BoDy", "$FrOm");
///Redirect user to your homepage....
if($send)
{
echo '
<p>';
echo '';
echo '
<p><font face="Verdana" size="1" color="#FF82A5"><b>Sent, redirecting!</b></font>';
echo '
<p>';
}
?>
</font>
</body>
</p>
</html>

 

This is the code which sort of processes the form. As you can see, I have inserted formatting on the sections entitled Name:, Email:, and Message:.

 

When I open the email, it comes up as this.

 

Name: #

Email: #

Message: #

 

The words name email and message are all in the font I choose. But after that (the bit the sender of the form types), is all in Times new Roman. Is there any way I can get the same font running through the email I recieve?

 

Possibly css or php?

It might help if you visit my site. www.coco-chanel.co.uk/contact.htm

 

Cheers,

Seth

x

Link to comment
Share on other sites

leave your font tag open until after all text is out.

 

$BoDy .= '<font face="Verdana" size="1" color="#FF82A5"><b>Name: </b>';
$BoDy .= $_POST['t1'];
$BoDy .= "\n";
$BoDy .= '<b>Email: </b>';
$BoDy .= $_POST['t2'];
$BoDy .= "\n";
$BoDy .= '<b>Comments:</b> ';
$BoDy .= $_POST['t3'];
$BoDy .= "</font>\n";

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.