•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 456,472 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,797 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 4159 | Replies: 3
![]() |
| |
•
•
Join Date: Dec 2006
Location: online at woocha.com
Posts: 41
Reputation:
Rep Power: 2
Solved Threads: 0
I am emailing a field from a MySQL DB table. The field type is text. Basically, it is an accept email. How can I make it so the email sent is capable of emailing HTML to make the message more attractive?
I have already tried to insert < html > into the text field, but that doesn't work....The received email, just diplays the text < html > and then the rest of the text.
ANy suggestions?
I have already tried to insert < html > into the text field, but that doesn't work....The received email, just diplays the text < html > and then the rest of the text.
ANy suggestions?
FREE Online Auctions At:
http://www.woocha.com/auctions
http://www.woocha.com/auctions
•
•
Join Date: Dec 2006
Location: online at woocha.com
Posts: 41
Reputation:
Rep Power: 2
Solved Threads: 0
The problem was in the PHP code...I needed to add a few steps that were missing the code went from:
to:
I am only posting this so other people can fix this problem without having to go through what I went throuygh....If you have any questions, reply to this thread
if ($action == "decline")
{
$query = "delete from orders where id=$id and merchant=$merchant";
mysql_query( $query);
if ($sendemail == "yes")
{
mail("\"$name\" <$email>",
"Your order has been declined!",
stripslashes($r['emaildecline']),
"From: \"".$r['company_name']."\" <".$r['email'].">\nReply-To: ".$r['email']);
}
}to:
$company_name = $r['company_name'];
$company_email = $r['email'];
if ($action == "decline")
{
$query = "delete from orders where id=$id and merchant=$merchant";
mysql_query( $query);
$message = stripslashes($r['emaildecline']);
$headers = "MIME-Version: 1.0 \r\n" .
"Content-type: text/html; charset=iso-8859-1\r\n" .
"From: $company_name <$company_email>\r\n" .
"Reply-To: $company_email";
if ($sendemail == "yes")
{
mail("\"$name\" <$email>",
"Your order has been declined!",
$message,
$headers);
}
}I am only posting this so other people can fix this problem without having to go through what I went throuygh....If you have any questions, reply to this thread
FREE Online Auctions At:
http://www.woocha.com/auctions
http://www.woocha.com/auctions
•
•
Join Date: Mar 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
ummm this is sorta something like this - i think.
Wat I am doing is creating a div overlay website- which basically i am putting the layout code into the mysql database... There are two parts to the code
the about me part which is basically the css of the layout
And the who i'd like to meet part - which is the html code.
My problem is - that i have a php file and to print this code as text - i have used a textarea box - because i need the code to come up into two different text area boxes that way when users click on - it just automatically copies.
My problem is - is that the 2nd set of code which is the html stuff - is printing half of it as text into the box - but the other half the web browser is literally taking as code... so wat do i do? - Do you know what is wrong with it???
Here is my site to see what i am talking about-
http://mydivspot.com/plaincart/index.php?c=24&p=15
Thank you
sandy
Wat I am doing is creating a div overlay website- which basically i am putting the layout code into the mysql database... There are two parts to the code
the about me part which is basically the css of the layout
And the who i'd like to meet part - which is the html code.
My problem is - that i have a php file and to print this code as text - i have used a textarea box - because i need the code to come up into two different text area boxes that way when users click on - it just automatically copies.
My problem is - is that the 2nd set of code which is the html stuff - is printing half of it as text into the box - but the other half the web browser is literally taking as code... so wat do i do? - Do you know what is wrong with it???
Here is my site to see what i am talking about-
http://mydivspot.com/plaincart/index.php?c=24&p=15
Thank you
sandy
•
•
Join Date: Dec 2007
Posts: 121
Reputation:
Rep Power: 1
Solved Threads: 14
Use PHP's htmlspecialchars() function to output the HTML as text. e.g.
echo htmlspecialchars("<html></html>");![]() |
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
ads adsense apple avatar backup breach code css daniweb data protection database design development div dreamweaver drm firefox google google checkout google checkout vat government guid partition table hacker html html api ibm ipod itunes javascript link management medicine mp3 music news normalization revenue security server sql store survey symantec tables text unit w3c web wysiwyg
- How insert image into mysql database and retrieve (PHP)
- Problem adding registration data to mysql database (JSP)
- retrieving image from mysql database using php (PHP)
- Filtering My sql through Php using drop down menu and text field (PHP)
- convert textfile into mysql database using vb.net (VB.NET)
- Output MySQL text field formatted (PHP)
- dynamically generated textboxes & radio buttons php, insert into db (PHP)
- database question (C#)
- Display and edit HTML\Plain text (C#)
Other Threads in the MySQL Forum
- Previous Thread: database query limitations
- Next Thread: Myisam and InnoDB


Hybrid Mode