473,397 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Simple If statement in ASP

I have no programming experience whatsoever, but nevertheless am I currently responsible for an update of a website, where a few hotels can be booked using an orderform.

The website is built with Frontpage and the orderform calls a rather simple asp-script, which basically just defines a few parameters and inserts these into an email, which is sent to the booking department.

The orderform lists the different types of rooms that can be ordered for each hotel and currently the complete list of rooms is repeated in the email that gets generated and then the number of rooms is listed for each type of room.

However it has been requested that only rooms that have been ordered (and the quantity) is being included in the email and I guess that this can be achieved using an If statement, but after a few attempts based on some ASP tutorials, I must confess that I need help - although it is probably very simple.

Below I have cut out the part of the ASP script where the variables are being inserted into the email. I now hope that someone can help me with how I get each of the the last two lines to only appear in the email, if they have been ordered in the orderform.
The values of the variables "SingleRoom" and "DoubleRoom" are the number of this room type that the customer has ordered, so you could say that the DoubleRoom line should only be included in the email if "DoubleRoom > 0".

Expand|Select|Wrap|Line Numbers
  1. Emailtext     = "Hotel:    " & Hotel & VbCrLf &_
  2.                 "Arrival:    " & DayOfArrival & "-" & MonthOfArrival & "-" & YearOfArrival & VbCrLf &_
  3.                 "NumberOfNights:    " & NumberofNights & VbCrLf & VbCrLf &_
  4.                 "RoomTypes:"  & VbCrLf &_
  5.                 "Single Room    " & SingleRoom & VbCrLf &_                                                                                     "Double Room    " & DoubleRoom & VbCrLf &_
I hope that someone can help!
Jan 2 '07 #1
6 2507
karthi84
271 100+
hi kamazoo,

i am not clear in ur question. what are the details u r in need to send through the mail. where are the room details stored i.e., in which database.

get me these details and let me try helping u.

regards....
Jan 3 '07 #2
hi kamazoo,

i am not clear in ur question. what are the details u r in need to send through the mail. where are the room details stored i.e., in which database.

get me these details and let me try helping u.

regards....

Hi karthi84,

I hope that I can provide you with the details that you need...

There is no database involved (it is a very simple solution). All information about the room types is coming from a form created in Frontpage, where the user select the number of rooms for each room type that he would like to book.

When the submit button is pressed on the Order form, the ASP script is called and inserts the room type variables into an order email that is sent to the booking department. What I hope to achieve is to only receive information about the room types that have been ordered - currently I get a full list of rooms, whether they have been ordered or not.

If this is not enough explanation, I could perhaps email you a sample booking form + asp-script. That would probably give you a better understanding of how it works currently.

Regards,
Jan 3 '07 #3
karthi84
271 100+
hi,

now i got a better idea about it. how u transfer the details from the front page. i.e., do u use any querry to get the details from frontpage or by how u r getting the info. i ask this question as i dont have any idea about the frontpage. if u use a querry then u can easily filter the details that have been selected and send them to the asp page. if u are able to send the code then send it to the pm so i can solve it personally for u.
Jan 4 '07 #4
hi,

now i got a better idea about it. how u transfer the details from the front page. i.e., do u use any querry to get the details from frontpage or by how u r getting the info. i ask this question as i dont have any idea about the frontpage. if u use a querry then u can easily filter the details that have been selected and send them to the asp page. if u are able to send the code then send it to the pm so i can solve it personally for u.
Hi,

I sent you an email instead, since I had to attach the relevant files. I hope that is ok.


Thanks and regards,
Jan 4 '07 #5
karthi84
271 100+
hi,
i got ur mail, i will be checking it and reply u. u can even attach a file in this form also.

let me reply u after solving ur problem
Jan 5 '07 #6
karthi84
271 100+
hi kamazoo,
i got a problem in editing ur asp page, when i run ur asp page it is checking the if condition with ur server from where i am not getting any response so i think i need all the pages that r linked with this two pages.

better let me guide u from here so that u can solve ur problem urself or get me all the pages that gets linked with its operations.

can u tell what information u get in the mail about the non selected rooms, i.e., room informations. is that empty or contains some value so i can easily assist u in solving it.

the problem seems to be in the region of webmaster text and the hotel text. as there only u call on all the values.
Jan 5 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Andreas Paasch | last post by:
I'm attempting to trigger things based on time. I have one shop that has opening hours, closing hours and lunch hours store as full hour values, integer, in MySQL. I retrieve them, based on...
27
by: Brian Sabbey | last post by:
Here is a first draft of a PEP for thunks. Please let me know what you think. If there is a positive response, I will create a real PEP. I made a patch that implements thunks as described here....
6
by: SB | last post by:
This while loop keeps repeating even when a correct character is entered.... cout<<endl<<"What day would you like to schedule the appointment?"<<endl; cout<<endl<<"Enter 'M' for Monday, 'T' for...
2
by: Anurag | last post by:
This simple one beats me all ends up(sincerely). I have been doing DB2 UDB for some time now, reading a lot of good discussions in this forum, writing some answers, asking a lot more but this...
3
by: ChrisHadley | last post by:
My simple sortheap configuration question is: the sortheap parameter specifies the amount of memory used by agents for sorts. Is this value the total for all agents or for each? Sort heap...
5
by: Tim::.. | last post by:
Can someone tell me how I convert this simple SQL statement so I can use it in ASP.NET??? I have an issue with the quotation marks and wondered if there is a simple rule for converting the sql...
14
by: dba_222 | last post by:
Dear experts, Again, sorry to bother you again with such a seemingly dumb question, but I'm having some really mysterious results here. ie. Create procedure the_test As
7
by: Helpful person | last post by:
I am new to Javascript and have a fairly straightforward question. I am trying to use an image as a link to open a new page with the onmouseclick event. In general this seems to work fine with...
1
by: Rahul Babbar | last post by:
Hi, I ran the scripts in a file from Command Line Processor and it gave the error for all the constraints being added, but not the indexes being added. For a simple statement like Alter...
7
by: CSharper | last post by:
Yesterday I had a heated discussion with my colleagues on what is a data centric application and having business logic in sql. I have group of people who wants to include all the business logic in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
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...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
tracyyun
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...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.