Location: PHPKode > projects > NOLA > lookup.php
<? require_once('includes/main.php'); ?>
<?
	for ($i=1;${"column".$i};$i++) {
		$columns .= ",".${"column".$i};
	};
	$columns=substr($columns,1);
	$recordSet = &$conn->Execute('select '.$columns.' from '.$table.' order by '.$order);
	if ($recordSet->EOF) die(texterror('No matching items found.'));
	echo '<form><select name="'.$table.'">';
	while (!$recordSet->EOF) {
		echo '<option value="'.$recordSet->fields[0].'">'.$recordSet->fields[0];
		for ($j=1;$j<=$i-2;$j++) {
			echo ' - '.$recordSet->fields[$j];
		};
		echo "\n";
		$recordSet->MoveNext();
	};
?>
<? require_once('includes/footer.php');?>
Return current item: NOLA