I am having trouble getting this script to populate the query data into a pull down menu. The SQL script works fine and displays the data with odbc_result_all but will not put it in the menu. Script is as follows: <?php $conn = odbc_connect("HOMES", "", ""); $billdate = $_POST[ 'billdate' ]; $query = ("SELECT DISTINCT sls_his_cust_id FROM sls_his where sls_his_prchdat_alt = $billdate"); $result = odbc_exec($conn, $query); echo "<FORM method=POST action=getcustdata.php>"; echo "<SELECT name=column_name>"; while($row = @odbc_fetch_array($result)) { echo "<OPTION VALUE=\"$row[0]\">$row[0]</OPTION>"; } echo "</SELECT><INPUT TYPE=submit name=submit VALUE=\"Get Results\"></FORM>"; ?> Any ideas? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php