473,385 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Adding Color to what is being emailed back to me on a PHP form....

Hi there,

I'm trying to make it so that the questions on the email that gets emailed back to me from my PHP form, or the answers, are in a different color. I've tried adding [color=red] [/color], or <font color="red"> </font> in various places, but it's just not working. Always gives me a parsing error. Please help....

My current code on the PHP send page:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. // get posted data into local variables
  4. $EmailFrom = "xx@xx.com";
  5. $EmailTo = "xx@xx.com";
  6. $Subject = "Someone is emailing you info!";
  7. $Name = Trim(stripslashes($_POST['Name'])); 
  8. $Email = Trim(stripslashes($_POST['Email'])); 
  9.  
  10. // validation
  11. $validationOK=true;
  12. if (!$validationOK) {
  13.   print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
  14.   exit;
  15. }
  16.  
  17. // prepare email body text
  18. $Body = "";
  19. $Body .= "What is your name? ";
  20. $Body .= $Name;
  21. $Body .= "\n";
  22. $Body .= "What is your email address? ";
  23. $Body .= $Email;
  24. $Body .= "\n";
  25.  
  26. // send email 
  27. $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
  28.  
  29. // redirect to success page 
  30. if ($success){
  31.   print "<meta http-equiv=\"refresh\" content=\"0;URL=thankyou.html\">";
  32. }
  33. else{
  34.   print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">";
  35. }
  36. ?>
  37.  
  38.  
THANK YOU!!!! Any help is greatly appreciated!!
Aug 16 '07 #1
1 1198
pbmods
5,821 Expert 4TB
Heya, Fran. Welcome to TSDN!

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.

Take a look at this document for more info on sending HTML email.
Aug 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

19
by: Vinod | last post by:
Hi, I have got a peculiar requirement. I want to distinquish between the color codes. I have got two text fields and i will enter the color codes there. The first text field will have ...
2
by: Clayton Hamilton | last post by:
I have a DataGrid on a webform bound to a Datasource and can successfully use <ItemTemplate> to create edit/update/cancel functionality for user maintenance of data. I use separate logic to delete...
5
by: Mike Dee | last post by:
Is it possible to dynamically create a new form object (form1), then create a new form field object and add it form1, and then add form1 to the current document? I need to do all this in script...
5
by: Gordon | last post by:
I'm working on a reset password script for my CMS, that will generate a random password and email it to a user when they request one. The problem I am having is that the mails being sent out are...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.