Archive for January, 2011

PHP,MySQL

I inserted a single link to database with a single field ‘addlink’, likewise i inserted again & again and now totally i have 5 rows. How can i get all the rows from database and update them. Please help with this. /*——————-Inserting working Successfully */ echo ‘<font size=”4px” face=”verdana”><b>Add a New Link</b></font><br><br>’; if($_SERVER['REQUEST_METHOD']==’POST’) { $add1 [...]

PHP file convert to XML

<? function parseToXML($htmlStr) { $xmlStr=str_replace(‘<’,'&lt;’,$htmlStr); $xmlStr=str_replace(‘>’,'&gt;’,$xmlStr); $xmlStr=str_replace(‘”‘,’&quot;’,$xmlStr); $xmlStr=str_replace(“‘”,’&apos;’,$xmlStr); $xmlStr=str_replace(“&”,’&amp;’,$xmlStr); return $xmlStr; } // Start XML file, echo parent node echo ‘<items>’; echo ‘<item ‘; echo ‘name=”‘ . parseToXML(stripslashes($sName)) . ‘” ‘; echo ‘address=”‘ . parseToXML(stripslashes($sAddress)) . ‘” ‘; echo ‘price=”‘ . parseToXML($iPrice) . ‘” ‘; echo ‘link=”‘ . parseToXML($sLink) . ‘” ‘; echo ‘details=”‘ . [...]

Convert PHP Array to XML or Simple XML Object

Convert PHP Array to XML or Simple XML Object if you wish……