<? include(<config.php>); mysql_host, mysql_pass) or die("Could not connect"); mysql_select_db(result = mysql_query("SELECT * FROM users ORDER BY id;") or die("<data><succes>false</succes><errormsg>Database error #1.</errormsg></data>"); if (aantal_users = mysql_num_rows(aantal_users>0) { echo "<data>"; echo "<succes>true</succes>"; echo "<users>"; for (i<i++) { result); echo " <user> <name></name> <color>user->color</color> <points>"; user->id' ORDER BY id;") or die("<data><succes>false</succes><errormsg>Database error #1.</errormsg></data>"); result2); for (j<j++) { result2); echo " <point> <lat></lat> <lon>point->lon</lon> <date></date> <time>point->time</time> <descr></descr> </point>"; } echo(" </points> </user> "); } echo " </users>"; echo "</data>"; } else { echo "<data><succes>false</succes>"; echo "<errormsg>No data in DB.</errormsg></data>"; } } else { echo "<data><succes>false</succes>"; echo "<errormsg>Could not connect to DB.</errormsg></data>"; } ?>
(C) Æliens 04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.