hi... i met a problem during request form and query string. When i select the data in select menu which are in 2 word, for example: "coffee shop", it only display "coffee" for me when return result. It only display 1 word for me. Anyone know what is the problem? Thanks you.. below is my code: <form method="POST" action="gourment_state1.asp?start=1" name="GForm" onSubmit="return validatec()"> <% Dim SearchText2, MyConn2, SQL2, SQL3, RS2 Set MyConn2=Server.CreateObject("ADODB.Connection") MyConn2.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("../../db/abc.mdb") & SQL2 = "Select * From GType order by Title asc" Set RS2 = MyConn2.Execute (SQL2) Response.Write "<select name=""GType"">" %> <%While Not RS2.EOF %> <%response.write" <option " %> <%response.write "value=" &(RS2.Fields.Item("Title").Value) & " >"%> <%response.write (RS2.Fields.Item("Title").Value) %> <%response.write "</option>"%> <% RS2.MoveNext Wend %> <%RS2.Close MyConn2.Close Set RS2 = Nothing Set MyConn2 = Nothing Response.Write "</select>" %> <input type="submit" name="Submit" value="Go"> </form> <%response.Write(request.form("gtype"))%><%response.Write(request.QueryString("gtype"))%> Code (markup):
I think that you need to surround the value in quotes in this line: <%response.write "value=" &(RS2.Fields.Item("Title").Value) & " >"%> you need to change it to: <%response.write "value='" &(RS2.Fields.Item("Title").Value) & "' >"%> Code (markup):