$queryComponentType = "SELECT idComponentType,nameComponentType FROM ComponentType"; //Execute query, or return an error message if there is a problem. $result1 = mysql_query($queryComponentType) or die(mysql_error()); $dropdown1 = "<select nameComponentType = 'ComponentType'>"; while($row=mysql_fetch_assoc($result1)){ $dropdown1 .="\r\n<option value='{$row['nameComponentType']}'> {$row['nameComponentType']}</option>"; } $dropdown1 .= "\r\n</select>"; echo"<p>Component Types: ".$dropdown1 ."</p>"; $querySerialComponent = "SELECT serialComponent,idComponentType FROM Components"; //Execute query, or return an error message if there is a problem. $result2 = mysql_query($querySerialComponent) or die(mysql_error()); $dropdown2 = "<select serialComponent = 'Components'>"; while($row=mysql_fetch_assoc($result2)){ $dropdown2 .="\r\n <option value='{$row['serialComponent']}'> $row['serialComponent']}<;/option>"; } $dropdown2 .= "\r\n</select>"; echo"<p>Component Serial Numbers: ".$dropdown2 ."</p>";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)