Yes
my goal is to have a user select a item in the drop down
based on what is selected
honda
or
toyota
or
subaru.
when they select it it will be inputed in the db table.
<!--------this is CarAddForm.cfm once it is submitt then it goes to the action
page CarAddAction.cfm------------>
<html>
<head>
<title>Car add make</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1> </h1>
<table>
<cfform action="CarAddAction.cfm" method="POST">
<tr>
<td>Car</td>
<td>
<SELECT name="CarMake" size="1">
<OPTION Value = "Toyo">Please Select</OPTION>
<OPTION Value = "Hon" <cfif Carmake is "Honda">selected</cfif>>Honda</OPTION>
<OPTION Value = "Toyo" <cfif Carmake is
"Toyota">selected</cfif>>Toyota</OPTION>
<OPTION Value = "Suba" <cfif Carmake is
"Subaru">selected</cfif>>Subaru</OPTION>
</select>
</td>
</tr>
<tr>
<td> </td>
<td>
<input type="submit" value="Add make to Database">
</td>
</tr>
</cfform>
</table>
</body>
</html>
<!------this is the action page CarAddAction.cfm--->
<cfdump var = "#form#">
<cfquery name="InsertCarInfo"
datasource="#Request.MainDSN#">
INSERT INTO Car_tab(
car_Make
)
VALUES (
'#Trim(Form.car_make)#'
)
</cfquery>
|