a question about promotional code

Results 1 to 2 of 2

Thread: a question about promotional code

  1. #1
    Join Date
    Dec 1969

    Default a question about promotional code

    Hi, asp gurus<BR>I need some help with the following problem.<BR>The customer needs to input a promotional code to the textfield, and the code needs to check if the code is the "correct" one for our company. If the code is correct, then the price charged will be different. How do i do that?<BR><BR>I write the function for the drop down list, but now i need to change it to text field and i am having troubles. Please help. Thank you.<BR>

  2. #2
    Join Date
    Dec 1969

    Default this is either dead simple...

    ...or really complex.<BR><BR>If the code is just a string--only one value possible--then it&#039;s dead simple:<BR><BR>&#060;%<BR>If UCase( Trim( Request("PromoCode") ) ) = "ZQ445781WW" Then<BR> ... give the discount ...<BR>End If<BR>%&#062;<BR><BR>Where, of course, you replace that "ZQ..." string with the real thing.<BR><BR>If, on the other hand, the PromoCode is customized for each user--say some kind of encryption of their customer number?--then how can we answer that without knowing the encryption algorithm.<BR><BR>The thing I can&#039;t figure out: How is this any different, on the ASP side, than when you used a &#060;SELECT&#062; on the client side???<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts