Hiding Text when MySQL has no data value

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

  1. #1

    Default Hiding Text when MySQL has no data value

    When a user signs into my website, he/she sees the following personalized
    information:

    Name: sample user
    Birthdate: 01/01/2005
    Favorite color: brown
    Favorite TV show: Desperate Housewives


    Say my user did NOT specify his/her favorite color in my database. It would
    look like this:

    Name: sample user
    Birthdate: 01/01/2005
    Favorite color:
    Favorite TV show: Desperate Housewives


    Why should the text "favorite color" still be there? It is not necessary. I
    want it to look like this:

    Name: sample user
    Birthdate: 01/01/2004
    Favorite TV show: Desperate Housewives

    sorry if i'm an idiot, but i can't figure this out! thanks a lot for any help
    :-)



    stuckinbed Guest

  2. Similar Questions and Discussions

    1. MySQL data into dynamic text field without escapesequence!!
      Hi guys, I got a music portfolio web site running PHP, MySQL and Flash. There's a page showing all the artists my client worked for and when you...
    2. Showing/hiding text through javascript
      There's a text where the user wants to show only when he hit a hotkey (F9 or Ctrl+j an example) but this PDF file will be created by VBA...
    3. MySQL 5.0, FULL-TEXT Indexing and Search Arabic Data, Unicode
      Hello All, This post is essentially a reply a previous post/thread here on this mailing.database.myodbc group titled: MySQL 4.0, FULL-TEXT...
    4. hiding fields in a record that have no data
      I am assuming this is pretty simple to do, but I am not sure how. I have an asp intranet site I am building. I have a one admin form that allows...
    5. Hiding data from screen scrapers and bots
      I was hoping someone here would know something about screen scrapers, spiders, bots. Perhaps it's a stupid question, but here it goes anyway... ...
  3. #2

    Default Re: Hiding Text when MySQL has no data value

    On Thu, 24 Mar 2005 04:59:19 +0000 (UTC), stuckinbed
    <webforumsuser@macromedia.com> wrote:
    > When a user signs into my website, he/she sees the following personalized
    > information:
    >
    > Name: sample user
    > Birthdate: 01/01/2005
    > Favorite color: brown
    > Favorite TV show: Desperate Housewives
    >
    >
    > Say my user did NOT specify his/her favorite color in my database. It
    > would
    > look like this:
    >
    > Name: sample user
    > Birthdate: 01/01/2005
    > Favorite color:
    > Favorite TV show: Desperate Housewives
    >
    >
    > Why should the text "favorite color" still be there? It is not
    > necessary. I
    > want it to look like this:
    >
    > Name: sample user
    > Birthdate: 01/01/2004
    > Favorite TV show: Desperate Housewives
    >
    > sorry if i'm an idiot, but i can't figure this out! thanks a lot for
    > any help
    > :-)
    >
    >
    >
    Usually you display this on a conditional regarding his session variable.
    In other words it will only display if he is inside a session. I guess the
    best way would be to include the whole paragraph under the conditional,
    unless you really want the unidentified user to be labled as a 'sample
    user' :D

    --
    Alexandro Colorado
    ------------------------------
    Support Engineer
    InterAKT Online
    [url]http://www.interaktonline.com[/url]
    Tel: 40(21) 312.5312
    Alexandro Colorado Guest

  4. #3

    Default Re: Hiding Text when MySQL has no data value

    thanks for your reply...

    the "sample user" is just a example of a record in the mysql database

    i'd like to know how to hide "favorite color" if the user never specified
    his/her favorite color in the database in the first place

    thanks!

    stuckinbed 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