|
Posted by J.O. Aho on 08/22/07 16:21
mbarbs wrote:
> On Aug 22, 2:41 am, Captain Paralytic <paul_laut...@yahoo.com> wrote:
>> On 22 Aug, 01:58, ZeldorBlat <zeldorb...@gmail.com> wrote:
>>
>>> On Aug 21, 6:36 pm, Matt Barbadian <mbarbs.m...@gmail.com> wrote:
>>>> I have a html link in a mysql database field that is getting queried
>>>> using PHP. My problem is when the page is rendered, the link displays
>>>> the html not an actual clickable link. Any help would be greatly
>>>> appreciated.
>>>> Thanks
>>> Tough to say what the problem might be -- you haven't provided any of
>>> your code.
>> Seconded
>
> This is the PHP i'm using to talk with the mysql database:
> <?php
>
> require_once('../../includes/scripts/db_connector.php');
> $connector = new DB_Connector();
> $result = $connector -> query('SELECT * FROM questions WHERE topic_id
> = 0');
> echo '<span class="title">Questions: Top 5</span>';
> echo '<div class="title_rule"></div>';
> while($row = $connector -> fetchArray($result)) {
> echo '<div class="question">'.$row['question'].'</div>';
> echo nl2br('<div class="answer">'.$row['answer'].'</div>');
> echo '<div id="faq_bttn" class="faq_more"></div>';
> echo '<div class="dotted_rule"></div>';
> }
> ?>
>
> The problem is i have this for example <a href="link.html">Link</a> in
> one of the fields in the mysql database. When the page loads it shows
> the html <a href="link.html">Link</a> NOT a clickable link.
The problem is how you store the value to the database, you most likely used
htmlentities() or a simialr function on the string before you stored it, which
makes it to be displayed as it's written and not parsed by the browser as
html-code.
--
//Aho
Navigation:
[Reply to this message]
|