Posts

Showing posts from May 13, 2010

Editing XML using PHP for Project Manipulation

I had an idea about creating tutorial that will cover manipulating XML in PHP. The idea was to create some website that will use XML as a database.You can use it for password storage for your website admin and even your website configuration. In this tutorial we'll try to edit some data in XML. Our XML looks like this. Apple 10.25 15 We'll load item element and change it's content. Then we'll create new item element and append it to fruits after first item. So let's start. Loading Document And Elements First we have to create new DOMDocument class instance. We'll set XML version and encoding. Next we'll set formatOutput to true so we can have nice output. We'll also set preserveWhiteSpace to false because there is some bug in PHP that will not save nicely newly created elements. Now we just have to load our XML file. $xml = new DOMDocument('1.0', 'utf-8'); $xml->formatOutput = true; $xml->preserveWhiteSpace = fal...

Execute Simple MySql Queries in Joomla

Hi as a Joomla Developer i faced so many problems while I started working on Joomla Development and i was always in the need of developing those components and modules easily without much using Joomla Code... Now a days I am getting so much responses on my Email regarding Learning Joomla Development.. So today i have started writing this post for my friends and other E-Friends who has some problems while starting with joomla development.. see you must be known to programming in PHP and Mysql to use this post,, some times you get a project about little update in joomla project and you refuse because you don't know how to start working with it.. here's a quick tip... suppose you have a PHP code file that perform and manipulate the basic tasks about what you want to do. you can then use the include method of PHP in joomla and joomla will not dis-allow it ... eg. include("../components/com_kddemo/phpcodefile.php"); execute your any of the code in phpcodefile.ph...