IF/ELSE on member.html

Discussion in 'Integration' started by jcrewguy24, Oct 2, 2009.

  1. jcrewguy24

    jcrewguy24 aMember Pro Customer

    Joined:
    Oct 21, 2007
    Messages:
    27
    I'd like to show the following on member.html considering the following:

    1. A new mysql field has been created in the members table called PIN

    2. The new field is blank upon new user account creation

    When the page is loaded, I'd like to check the "PIN" field. If the contents are empty, parse a block of html. If there is data in the field "PIN" then I'd like to display the contents.

    Thanks!!
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Something like:

    {if $smarty.request.fieldname == ""}
    blank text
    {else}
    not blank text
    {/else}
    {/if}

    David
  3. jcrewguy24

    jcrewguy24 aMember Pro Customer

    Joined:
    Oct 21, 2007
    Messages:
    27
    Exactly what I needed except closing the ELSE made smarty angry so I removed it and all worked well!

    Thanks :)

Share This Page