nade93 Posted February 2, 2009 Share Posted February 2, 2009 Hi All I taking certain text info from MYSQL database to insert it into the following xml file <?php mysql_connect("mysql1063.servage.net", "ysalon", "eldonsquare") or die(mysql_error()); mysql_select_db("ysalon") or die(mysql_error()); $result = mysql_query("SELECT introtext FROM jos_content WHERE id=1"); $row = mysql_fetch_assoc($result); echo $row['introtext']; ?> I then parse this through to my flash file and works fine. The "introtext" is taken from the joomla cms system for an article and i need the html elements (such as formating) to be also applicable to the xml file so it shows up the formating correctly in the flash file. (i.e. such as <br> and <p> elements) At the moment it is just showing the actual code rather than the effects of the code any help would be great thanks Link to comment https://forums.phpfreaks.com/topic/143480-using-php-to-take-data-off-mysql-into-xml-and-including-the-html-elements/ Share on other sites More sharing options...
fanfavorite Posted February 2, 2009 Share Posted February 2, 2009 To make things simple, you are trying to make this php document as xml? You need to set headers first: header('Content-type: application/xml'); and you also need to make sure you have the xml tag at the beginning: echo '<?xml version="1.0" encoding="utf-8"?>'; Link to comment https://forums.phpfreaks.com/topic/143480-using-php-to-take-data-off-mysql-into-xml-and-including-the-html-elements/#findComment-752685 Share on other sites More sharing options...
nade93 Posted February 2, 2009 Author Share Posted February 2, 2009 hey thanks for the advice inserted the header etc but still does not solve the issue that the html tags are still showing up any ideas? Link to comment https://forums.phpfreaks.com/topic/143480-using-php-to-take-data-off-mysql-into-xml-and-including-the-html-elements/#findComment-752747 Share on other sites More sharing options...
fanfavorite Posted February 3, 2009 Share Posted February 3, 2009 You need to give more information then. Can you give a link to the page or post the source from the outputted page? Link to comment https://forums.phpfreaks.com/topic/143480-using-php-to-take-data-off-mysql-into-xml-and-including-the-html-elements/#findComment-753094 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.