473,770 Members | 6,091 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple If statement in ASP

3 New Member
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 2522
karthi84
271 Contributor
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
kamazoo
3 New Member
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 Contributor
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
kamazoo
3 New Member
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 Contributor
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 Contributor
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
1736
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 comparisons either shop is open, about to close or actually closed. When open, nothing particular is written, when closed, customer is informed orders can't be executed, shop is closed. But the last one, right about 15 minutes before closing time,...
27
2394
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. It is available at: http://staff.washington.edu/sabbey/py_do Good background on thunks can be found in ref. . Simple Thunks
6
1492
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 Tuesday, 'W' for Wednesday, 'H' for Thursday \n"<< "and 'F' for Friday: "; cin>>day; while (day != "M" || day != "m" || day != "T" || day != "t" || day != "W" || day != "w" || day != "H" || day != "h" || day != "F" || day != "f")
2
1818
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 simple question has floored me completely. Either I pretend that I know or I could let the kowledgable ones pass on some wisdom to me :-) When we say that: (1) "CLP in Db2 V8.2 still imposes a limit of 64K on the stored proc size;
3
1945
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 thres for shared sorts (4KB) (SHEAPTHRES_SHR) = (SHEAPTHRES) Sort list heap (4KB) (SORTHEAP) = 3000 SQL statement heap (4KB) (STMTHEAP) = 3000
5
1739
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 statement so if can be used in ASP.NEt! Thanks ... SQL String
14
5907
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
1660
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 the open statement. I wish to use the same script at various places in my web and hence wish to pass to the javascript function the URL location and the width and height of the new page. I am having no luck trying to get the open statement to...
1
2163
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 table A add constraint A_const foreign key(col1) references B(col2);
7
1808
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 the sql stored proc and I for one consider to have most of the business logic in the C# code (specifically in a controller class of MVC). These are my points to them. 1. Our application depends a lot on the data and we have huge amount of data...
0
9595
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9873
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8891
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7420
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5454
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3974
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.