Putting identical form fields into database

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Putting identical form fields into database

    I want to add a new entry to my database..

    I have the form with all the fields ready.

    However for one particular field, i want to have a drop down list of what's
    already in that field in the database (not a problem, a new recordset, with
    DISTINCT set works fine) .
    However what i also want is to have a field beside this that will allow the
    user to add their own category if it's not already in the databse.

    So, how can i get the insert behaviour to insert whichever of the two fields
    the user has selected??

    I've named both fields the same, the drop down and the text entry, but that
    just seems to confuse matters!

    Any help is greatly appreciated.

    Donal
    :beer;

    Donalo2000 Guest

  2. Similar Questions and Discussions

    1. putting filenames into a database?
      Given a folder that contains a bunch of .jpg images, is there a way to automate putting each file name into a separate row of a database or...
    2. Creating database fields from Struct(FORM)
      I have a survey that has a few questions which change every month. I am looking for a way to edit the HTML only and add the relevant FORM variables,...
    3. Putting/retriving files into a database
      Hello, its been a while since I posted/looked here... my normal email client doesn't handle newsgroups :( (ximian evolution) I was wondering how...
    4. Problem with putting timestamps in date fields after Fix 10 (DB2 7.2)
      Hello out there, why does DB2 7.2 Fix 10 not more allow to put timestamps in date fields. In prior versions the time information was ignored....
    5. Adding fields adb putting the result into another field
      I'd suggest a clientside group to start with. That is all VBScript on the client, not an ASP --...
  3. #2

    Default Re: Putting identical form fields into database

    If you have two fields with the same name, the insert will take both values
    and separate them with a comma which is not what you want.

    What you need to do is write an IF statement that tests the second field for
    a value and if one is found use that on the insert.

    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "Donalo2000" <webforumsuser@macromedia.com> wrote in message
    news:d0naus$22o$1@forums.macromedia.com...
    > I want to add a new entry to my database..
    >
    > I have the form with all the fields ready.
    >
    > However for one particular field, i want to have a drop down list of
    what's
    > already in that field in the database (not a problem, a new recordset,
    with
    > DISTINCT set works fine) .
    > However what i also want is to have a field beside this that will allow
    the
    > user to add their own category if it's not already in the databse.
    >
    > So, how can i get the insert behaviour to insert whichever of the two
    fields
    > the user has selected??
    >
    > I've named both fields the same, the drop down and the text entry, but
    that
    > just seems to confuse matters!
    >
    > Any help is greatly appreciated.
    >
    > Donal
    > :beer;
    >

    Paul Whitham TMM 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