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

  1. #1

    Default Re: form advice needed

    Yes, in your cfif's just set the form value to a session value then call it in
    your second form.

    <cfif whatever your cfif is>
    <cfset session.form1info = form.field>

    THEN

    call it by #session.form1info#


    pflynn02 Guest

  2. Similar Questions and Discussions

    1. advice needed
      On Sat, 2003-08-02 at 17:47, M. Kathryn Sweetland wrote: Hello new user, I am unsure if your want to upgrade your harddrive to increase your...
    2. Newbie Here, Advice Needed
      Hi All I have been programming in C/C++ and VB for some time now and have been thinking about PHP. I have been told that there are many free...
    3. Advice/ideas needed
      Hi, I've just put online a house walkthrough I've been working on this week. http://www.1lg.com/3d/house.htm It's my first project in Director...
    4. comments/advice needed
      I am working on a project site. The url is www.search24-7.com. I am looking for feedback (both negative and positive). I am new here and want to...
    5. Sitecheck and advice needed
      Here's the bare bones website: http://www.chameleonmoments.com/V2/ I'd like some comments on the useability and look of the navigation. The...
  3. #2

    Default Re: form advice needed

    Thanks for your reply when you say:

    <cfset session.form1info = form.field>

    do i actually use form.field or do I have to change that to another name?

    Thanks.
    theDude28 Guest

  4. #3

    Default Re: form advice needed

    You will use "form.whatever_the_name_of_your_variable_is" so if on the first
    form the user fills in these three boxes,

    <cfinput type="text" name="last_name">
    <cfinput type="text" name="first_name">
    <cfinput type="text" name="middle_name">

    on the page with the cfifs, you can have

    <cfset session.last = form.last_name>
    <cfset session.first = form.first_name>
    <cfset session.middle = form.middle_name>

    Then to use in the second form you would do

    <cfoutput>
    <cfinput type = "text" name="whatever" value = "#session.last#">
    <cfinput type = "text" name="whatever" value = "#session.first#">
    <cfinput type = "text" name="whatever" value = "#session.middle#">
    </cfoutput>
    You will also need to have session variables turned on. Not sure if you have
    done this. Try the above first, if it doesn't work then either search or post
    the forums on how to turn on session variables.

    Tulsa Guest

  5. #4

    Default Re: form advice needed

    Thanks for your reply when i do this i get the error element WHATEVER is undefined in SESION.

    Any ideas?

    Thanks again.
    theDude28 Guest

  6. #5

    Default Re: form advice needed

    Did you use CFSET to set that session variable of WHATEVER? And make sure it contains a value, not blank.
    pflynn02 Guest

  7. #6

    Default Re: form advice needed

    Thanks I was just wondering what these session variables are? Is it also ok for me to use them in this situation as users at this stage will not be logged into the website?

    Thanks.
    theDude28 Guest

  8. #7

    Default Re: form advice needed

    Yes
    pflynn02 Guest

  9. #8

    Default Re: form advice needed

    Thanks for your reply so does this mean that the variables won't be affect anything when a user logs in?
    theDude28 Guest

  10. #9

    Default Re: form advice needed

    The variables are present until they expire, either when the user closes browser or when your session vars are set to expire OR you manipulate them. So yes, they will still be there when you login.
    pflynn02 Guest

  11. #10

    Default Re: form advice needed

    thanks for the reply. do you know how I can record different sessions for different users who log in so each time they log in they can see their unique information?
    theDude28 Guest

  12. #11

    Default Re: form advice needed

    Not sure what you mean. Do you mean taht if UserGroupA members login, set XX session vars, and UserGroupB members login set YY session vars?
    pflynn02 Guest

  13. #12

    Default Re: form advice needed

    Im not really sure, what i need to do is get it set up so that when the users log in they can view their own unique information but im not sure how to do this.
    theDude28 Guest

  14. #13

    Default Re: form advice needed

    If you want to record information about a user and then display it when they
    log in you must use a database. I assume that you currently have a table with
    usernames and passwords in so they can log in? Well if you assign each set of
    usernames a unique ID then you can record data in a different table that ties
    their information to their login information. Get a good book on building
    realtional databases and one on SQL. This will help you avoid basic errors,
    what you want to do is pretty common and is incorporating basic techniques that
    you will use all the time in applications you build.

    Stressed_Simon Guest

  15. #14

    Default Re: form advice needed

    Thanks for your reply i am currently using the usernames as the unique ID but i
    still can't find out how to identify the user that has logged in and then allow
    them to see their own unique inforamtion.

    theDude28 Guest

  16. #15

    Default Re: form advice needed

    <cfquery datasource="MYDATASOURCE" name="myquery">
    Select *
    From MYUSERTABLE
    WHERE Username = #session.username#
    </cfquery>
    pflynn02 Guest

  17. #16

    Default Re: form advice needed

    Thank you very much for your reply I have been reading some information on
    session variables and have got them switched on in my Application.cfm file and
    i was just wondering how I could now go about making each userid a session
    variable?

    Thanks

    theDude28 Guest

  18. #17

    Default Re: form advice needed

    Are you talking about AFTER the user logs in?
    pflynn02 Guest

  19. #18

    Default Re: form advice needed

    I think I got it sorted thanks. The variables were set in the login page.
    theDude28 Guest

  20. #19

    Default Re: form advice needed

    Alrighty!
    pflynn02 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