Form data to session variable

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default Form data to session variable

    Am trying to pass a form's data along as a session variable. Purpose to let
    user see updated information, and if all is ok, pass it on to a template to
    update database. I set a session.tempInfo equal to the form. <cfset
    session.tempInfo = form /> When I dump session.tempInfo on the original page,
    it shows the struct of the form. If go to another page from there, however,
    the session.tempInfo exists but the structure is empty. Setting another
    session variable structure at the same place as setting the tempInfo, carries
    over to other pages as it should. It seems as if the form behaves differently.
    I'd guess that I'm doing something wrong in setting the session form variable,
    but ... Would appreciate any help on this topic. Thank you. Keith

    Keith Dodd Guest

  2. Similar Questions and Discussions

    1. #39634 [NEW]: session variable and normal variable
      From: erhanbaris at gmail dot com Operating system: Win Xp SP1 PHP version: 5.2.0 PHP Bug Type: Variables related Bug...
    2. #25551 [Opn->Bgs]: Session data loss when accessing session from multiple windows.
      ID: 25551 Updated by: sniper@php.net Reported By: brett at realestate-school dot com -Status: Open +Status: ...
    3. #25551 [NEW]: Session data loss when accessing session from multiple windows.
      From: brett at realestate-school dot com Operating system: Linux - Red Hat PHP version: 4.3.1 PHP Bug Type: Session related...
    4. Datalist - how (if) to use a sub variable or session variable in the footer?
      Hi, sorry to be greedy with all my posts lately, but can you tell I'm doing new things this week? I've just done my first datalist (a simple...
    5. [SESSION] Session variable deleted prior to command?
      Hi all, I'm developing a database system on my local computer (OS/version details at bottom) with a simple user authentication using sessions. On...
  3. #2

    Default Re: Form data to session variable

    Keith, you've created a reference to FORM structure instead of a copy. You should use the Duplicate function so that the data is not losted.

    <cfset session.tempInfo = Duplicate(FORM)>

    eastinq Guest

  4. #3

    Default Re: Form data to session variable

    Thanks!
    That took care of it.

    Keith
    Keith Dodd 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