Pass encrypted text to SQL database from a form.

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Re: Pass encrypted text to SQL database from a form.

    Move the key and 3 encyption lines to directly above your CFQUERY tag and
    encypt the form values

    <CFSET key = "98q34jt">
    <CFSET encrypted1 = encrypt(form.name, key)>
    <CFSET encrypted2 = encrypt(form.number, key)>
    <CFSET encrypted3 = encrypt(form.question, key)>

    Then, inside your query, insert the encrypted values like
    <cfif IsDefined("FORM.name") AND #FORM.name# NEQ "">
    '#encrypted1#'
    <cfelse>
    NULL
    </cfif>

    Just make sure that your DB columns are large enough to hold the new encrypted
    values.


    steveh1234 Guest

  2. Similar Questions and Discussions

    1. Pass URL Parameter from html form to flash form
      In CF, I have a link to a form to update a students attendance; takeattendancehv1.cfm?StudentID=#allstudents.StudentID# . I'm using a flash form in...
    2. Connect to database using encrypted password
      I'm needing to connect to a database manually (not using cfquery). However I'm not wanting to hardcode the password into the file. I have a...
    3. How to pass a form input text value to a javascriptmethod?
      Hello, I have a PHP page that gets product records from a database and layout the records on a form table. The PHP page look like this: ...
    4. Passing database info to page allow user input then pass into another database
      Hi I really am going crazy! I'm using VBScript, ASP, and SQL My page reminds me of a shopping cart but looking at shopping cart examples has not...
    5. Reinstaled, Lost profiles, encrypted files left encrypted
      Bob; Are you sure it is not an Ownership issue: http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q308421& If the files are encrypted. If...
  3. #2

    Default Re: Pass encrypted text to SQL database from a form.

    That worked perfectly!! Thank you so much!!
    JanSke Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139