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]";
?>

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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