Announcement

Collapse
No announcement yet.

I got a major VBScript problem, someone help!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • I got a major VBScript problem, someone help!

    Okay, I am new to VBScript, so go easy on me.

    I have this webpage that has a form on it that collects data from a user; The typical name, address, etc.

    However, the form also requires the user to choose which hotel they want to go to. (they are in drop down menu's). You hit submit then it goes to another page which pulls all the information together and also gives you a price tag.

    The costs for all the hotels are in the dbm file. So when you select "whatever hotel" and hit submit, it will go into the dbm file, find "whatever hotel" find its price and then place that in the 2nd page (where you confirm the details).


    Okay, that I have got working fine, but the problem lies in the fact that there is a SECOND price that needs to be ADDED to the hotel price.

    Lets say for example that the user also selects a tour guide that costs $250. The information is in the database; so how to get the script to add the tour guide price and the hotel price for the confirmation page?



    I'm not entirely sure, but I think this portion of the code is the bit I have to change:


    if (chk1 <> 0 or chk1 <>"") then
    cost_st = chk1 * cost1
    else
    cost_st = 0
    end if
    if (chk2 <> 0 or chk2 <>"") then
    cost_nd = chk2 * cost2
    else
    cost_nd = 0
    end if
    if (rc_reg <> 0 and temp <> 0) then

    fee_rate = objrsreg("fee_rate")
    cur_type = objrsreg("cur_type")
    reg_amount = cost_st + cost_nd
    reg_amount = (reg_amount + (no_reg * fee_rate))



    At the moment, this piece of code just does the hotel price, (no_reg is actually the number of people going to the hotel, so if the user puts in 2, it will be the cost of the hotel X 2 which is why it says "no_reg * fee_rate".
    be free

  • #2
    Why would you want to use VB Script since it only works on IE?
    (\__/) 07/07/1937 - Never forget
    (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
    (")_(") "Starting the fire from within."

    Comment


    • #3
      Why do you spam every thread I make?

      If you see "Sn00py" under "Thread Starter" just ignore it.

      Don't reply to this! Spammer.
      be free

      Comment


      • #4
        Why do you consider a legitmate question spam?
        (\__/) 07/07/1937 - Never forget
        (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
        (")_(") "Starting the fire from within."

        Comment


        • #5
          Okay, you see, I asked a question, and in return I got another question.


          VBS does work under other browsers, I have tested it.

          I just want my question answered, if you want to know the answer to your question start a thread and name it "Why do people use VBS when it only works for IE?".
          be free

          Comment


          • #6
            Come on, someone must know!
            be free

            Comment

            Working...
            X