view php/read/getBrowseNodes.php @ 49:a67bf725e87b

put both paths in include_path and depend on that
author Charlie Root
date Wed, 16 Jan 2019 13:42:15 -0500
parents 077b0a0a3e6d
children
line wrap: on
line source

<?PHP

include "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);


?>