Make use of Yapter Template Engine
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
|
||||
<?php
|
||||
function display_children($parent, $level) {
|
||||
$result = mysql_query("SELECT location_id, location_name FROM location WHERE parent='$parent' ORDER BY location_name");
|
||||
$result = mysql_query("SELECT location_id, location_name FROM location WHERE parent='$parent' ORDER BY location_name") or die(mysql_error());
|
||||
while ($row = mysql_fetch_object($result)) {
|
||||
echo '<option value="' . $row->location_id . '">' . str_repeat(' ',$level) . $row->location_name . '</option>';
|
||||
display_children($row->location_id, $level+1);
|
||||
|
||||
Reference in New Issue
Block a user