Hi,
I'm creating a website for an hotel and i need to know how to collect data from a drop down list then search in the database and display it in another page. the design is like this:
DropDownList1// view
DropDownList 2// capacity
DropDownList 3//price
RadioGroup //type of data sort (Rooms are sorted by price or by room number) Button1
what I want to do is when I click the button, I collect all the data that the user chose in all the controls (DropDownList1,DropDownList 2,DropDownList 3,RadioGroup) and start to search with them in the database, for example if the user chose the sea view and the capacity 2 persons and the price between 10$ and 20$ sorted by price, I will display all the rooms with a sea view and capacity 2 persons and a price between 10$ and 20$, sorted by price.
please help,
Thanks :)
1 1556
hey, nina, welcome to the scripts developer network.
how much do you have done so far? is your form and db already set up? Can you already connect to a db through asp? do you know how to write a db query?
If you are just wondering about how to write the query, I would try something like this: - query = "SELECT * FROM rooms WHERE view LIKE %"
-
query = query & request("view") & "%"
-
query = query & " AND capacity = " & request("capacity")
-
query = query & " AND price BETWEEN " & request("price")
-
query = query & " ORDER BY " & request("sort")
-
-
'print out query just to make sure it looks right
-
response.write "<!-- " & query & " -->" & vbNewLine
-
-
rs.open query, conn
-
-
do until rs.eof
-
'list each room and details
-
'etc however you like
-
rs.movenext
-
loop
let me know if this helps
Jared
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Dan |
last post by:
This is one that has me stumped and I need an expert's input.
Any ideas why the values from the second script-generated drop down
list isn't recognized by the script to add time values to the...
|
by: Dec |
last post by:
Ok to simplify things I'll just give an example.
This is pretty much what I want to do (minus the postcode):
http://www.perrys.co.uk/usedcar?ID=F5J9BNNBMVK00DF
I have relatively little...
|
by: Miguel Dias Moura |
last post by:
Hello,
i have an ASP.NET / VB page where i have a few 4 groups of Drop Down Lists.
Each group of Drop Down Lists include 3 Drop Down Lists for date such as:
DAY, MONTH, and YEAR.
I don't want...
|
by: Yoshitha |
last post by:
hi
I have 2 drop down lists in my application.1st list ontains itmes like
java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the
items like 50,60,70,80,90,100.
i will...
|
by: Ed Dror |
last post by:
Hi there
ASP.NET 2.0 VB & SQL Express
Lest take Northwind Categories Products as example
I create a table that hold these two together
and I create a stored procedure like
select ProductID,...
|
by: ashok893 |
last post by:
I'm using two drop down list ina form. I have generated the first drop down list from MySQL database. When i select an option from first drop down list, i have to generate second drop down list...
|
by: TycoonUK |
last post by:
Hi,
As I do not have IE7 on my computer, I was wondering if there is a
fault in my CSS Menu when using IE7.
Please can someone look at my site - http://www.worldofmonopoly.co.uk
and tell me...
|
by: penny111 |
last post by:
Hi there,
For my application, i need to have 3 drop down lists
1. drop down list of folder names
2. drop down list of documents in the folder selected
3. drop down list of instances of the...
|
by: dskanth |
last post by:
I have 4 drop down lists, namely Location, country, State and City.
Ex: Location: Asia, Country: India, State: Andhra Pradesh, City: Hyderabad.
If i select any option in the Location drop down...
|
by: sandeepsangshetty |
last post by:
How do I create a drop down list which has the values from a database column. So I need this list to have values like"
"Select distinct departmentname from Department"
The Department name...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| | |