Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question coupon code but checking different way:)

    Hello my friends.. Sorry for my english

    I want to use a coupon code system on my website, I looked all codes, but I want differently.

    For example,
    we have a text form, (<input type="text" )
    when somebody enters the coupon code, the script will check it automatically if it is true or not..If it is true, right on the text form it will write "cuopon code is true", if not "coupon code is invalid"

    I dont want to use mysql database..It has to be simple way..right coupon code may be store even in .dat file or notepad..
    how can I do this ?

    thank u.
    Edit/Delete Message

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,910
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    This should be done server-side. JavaScript can not read from or write to a file. But you can possibly check by having pages named something like K48727.html, and if the user enters the correct promotional code K48727 into the textbox then if the page exists it can be loaded into an i-frame.

  • #3
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok how can I do this, then? Is there anything different way to apply coupon code simply? would u pls write them all with explanation

  • #4
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Look into Ajax.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


  •  

    Posting Permissions

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