Forum Moderators: coopster

Message Too Old, No Replies

Font

Font problem

         

afridy

2:36 pm on Jun 23, 2006 (gmt 0)

10+ Year Member



Hello!

i am at my early stage in php. but going well with mysql.

i tried to change the font type and size in my project.

[phpcode]
$body=$body . "<font face=Tahoma size=14>Wellcome to my website</font>\n";
[/vbcode]

But the output prints every thing as follows >

font face=Tahoma size=14>wel come to my website</font>

Pls help me...

eelixduppy

3:04 pm on Jun 23, 2006 (gmt 0)



This seems a little strange. Why don't you just echo each individually?:

echo $body;
echo "<font face='Tahoma' size='14'>Welcome to my website</font>\n";

afridy

3:33 pm on Jun 23, 2006 (gmt 0)

10+ Year Member



Hai eelix...

I dont think echo will solve my problem. coz i am putting this in to an email body. actually 'wel come to my website' is not really i am going to type :)

Scally_Ally

4:01 pm on Jun 23, 2006 (gmt 0)

10+ Year Member



if you are putting this into an email, make sure you have the appropriate headers to make the email html. something like

$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: somkewhere <info@somkewhere.com>' . "\r\n";

then the markup will be recognised

afridy

4:14 pm on Jun 23, 2006 (gmt 0)

10+ Year Member



hai scalli

i have a complete email code.
i can receive emial with the default font and size.

whai i wanted is to make the font in tahoma + 14 on some lines of the body ...

Scally_Ally

8:14 am on Jun 26, 2006 (gmt 0)

10+ Year Member



can you post some code of what you are doing and we can have a look at it..?

afridy

1:00 pm on Jun 26, 2006 (gmt 0)

10+ Year Member



Hai Scalli and IEEE

I am sorry that i got a solution in an outside forum yesterday. actually i thought to inform it in this thread by today .

It was really a problem with the header.
it was written like

"Content-type: text/htmlcharset=iso-8859-1"
it should be

"Content-type: text/html; charset=iso-8859-1"

I think as you all told i shoud have post atleast part of the code.

Thank you all.
bye