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
- Emailtext = "Hotel: " & Hotel & VbCrLf &_
- "Arrival: " & DayOfArrival & "-" & MonthOfArrival & "-" & YearOfArrival & VbCrLf &_
- "NumberOfNights: " & NumberofNights & VbCrLf & VbCrLf &_
- "RoomTypes:" & VbCrLf &_
- "Single Room " & SingleRoom & VbCrLf &_ "Double Room " & DoubleRoom & VbCrLf &_