view php/read/getBrowseNodes.php @ 10:5aa24c984a3b

if no code show entire response
author Henry S. Thompson <ht@markup.co.uk>
date Sat, 18 Feb 2017 12:28:36 +0000
parents 077b0a0a3e6d
children 385ddd7c4b55 a67bf725e87b
line wrap: on
line source

<?PHP

include "../../../private/db.php";

$query = "CALL b_getBrowseNodes()";
$results = mysqli_query($link, $query) or exit( mysqli_error( $link ));

$output = "";
$output .=  "<?xml version=\"1.0\"?>";
$output .=  "<BrowseNodeKey>";

while($line = mysqli_fetch_assoc($results)) {
	
	$output .=  "<Node>";
	$output .=  "<Key>" . htmlspecialchars(trim($line["BrowseNodeID"])) . "</Key>";
	$output .=  "<Value>" . htmlspecialchars(trim($line["BrowseNodeValue"])) . "</Value>";
	$output .=  "</Node>";
}

$output .=  "</BrowseNodeKey>";

echo $output;

mysqli_close($link);


?>