Jump to content

Getting text from mysql putting it in webpage


Emperio

Recommended Posts

Hi all,

 

I have implemented a WYSIWYG in my admin panel, here i can write text and customize it how i want it and then convert it to a html code and save it in my mysql database.

 

Now I want to let other people see the text in the homepage, but it is showing this text very wrong functions like this

<p> <b> <strong> <font>

arent working.

 

For example I make text

<b>title</b>    <strong> blabla bla bla </strong>  

then the text becomes like this litterly

"<b>title<b>    <strong> blabla bla bla </strong>  "
the codes have no effect and are seen as text in the homepage.

 

My question is how is this possible and how can i fix this, thanks.

 

The code on my homepage is like this

<?php 
    $tekst="SELECT * from homepage where id='1'";
    $tekst2=mysql_query($tekst) or die("unable to connect");
    $tekst3=mysql_fetch_array($tekst2);
    print "$tekst3[tekst]";
?>

Like this

<p><span style="font-size: large; font-family: comic sans ms,sans-serif;">Title: Example tekst</span></p>

<p><span style="color: #ff0000;">Name: Emperio</span></p>

<p><strong>This is example text to let you guys show the error.</strong></p>

<p>The End.</p>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.