Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Other Web Development Languages (http://www.programmingforums.org/forum40.html)
-   -   store HTML is a text field in a table on a MySQL Database (http://www.programmingforums.org/showthread.php?t=13963)

woocha Sep 14th, 2007 11:22 AM

store HTML is a text field in a table on a MySQL Database
 
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?

titaniumdecoy Sep 14th, 2007 12:04 PM

You need to set the Content-Type header to text/html.

woocha Sep 14th, 2007 12:10 PM

Quote:

Originally Posted by titaniumdecoy (Post 133793)
You need to set the Content-Type header to text/html.

What do you mean?
Do you mean in my php code?

here is my code:
:

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']);
}
}


ReggaetonKing Sep 14th, 2007 12:47 PM

No. In your MySQL database, you should be able to change that field's Content-Type. Are you using any GUI to manage your data?

woocha Sep 14th, 2007 12:50 PM

Quote:

Originally Posted by ReggaetonKing (Post 133795)
No. In your MySQL database, you should be able to change that field's Content-Type. Are you using any GUI to manage your data?

Do you mean PHPMyAdmin?

ReggaetonKing Sep 14th, 2007 12:51 PM

Yes! I don't have PHPMyAdmin in front of me but when you edit your columns, you should see where you can change the Content-Type.

woocha Sep 14th, 2007 12:53 PM

Quote:

Originally Posted by ReggaetonKing (Post 133797)
Yes! I don't have PHPMyAdmin in front of me but when you edit your columns, you should see where you can change the Content-Type.

Yes...do you know what type it should be instead of text?

ReggaetonKing Sep 14th, 2007 12:59 PM

Quote:

Originally Posted by titaniumdecoy (Post 133793)
You need to set the Content-Type header to text/html.

Read Above!

woocha Sep 14th, 2007 1:04 PM

Quote:

Originally Posted by ReggaetonKing (Post 133799)
Read Above!

there is no option for text/html...there is text, date, smallint, mediumint, int bigint, float, double, dceimal, datetime, timestamp, time, year, char, tinyblob, tinytext, blob, mediumblob, mediumtext, longblob, longtext, enum, set, bool

ReggaetonKing Sep 14th, 2007 1:07 PM

I think you're look at the wrong option list. There should be another one, maybe it's file type?


All times are GMT -5. The time now is 10:19 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC