2 Replies Latest reply on Aug 25, 2008 12:11 PM by budeborton

    Advanced Conditions

    budeborton
      I have a web form that sends an email to a user after successfully registering. Since this particular form allows empty email accounts, I have a condition that send them an email ONLY IF the email is not empty.

      Email Condition = {email}!= ""

      This works perfectly fine, but I now need another condition added. I do not want the auto email to send to anyone with an AOL address.

      I have tried: {email}!="" && {email} NOT LIKE "%@aol.com"
      (this is similar to what I would use in a standard SQL statement) but it does not work at all. It doesn't seem to accept the "NOT LIKE" statement. Obviously the "!=" will not work in the latter since it then looks for the wildcard symbol in the email :)

      Does anyone have any suggestions?
        • 1. Re: Advanced Conditions
          Günter Schenk Level 4
          Hi Sean,

          SQL like comparison parameters don´t work when PHP is supposed to examine a text string ({email}) for a given substring (aol), so you´ll need to help yourself with PHP´s stristr() - function: http://de.php.net/manual/en/function.stristr.php

          On that page you´ll find an "Example #2 Testing if a string is found or not", and I´d use this example in a modified form

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: Advanced Conditions
            budeborton Level 1
            Günter,

            Thanks for kicking me back into play!

            Why in the world was I thinking SQL when I was clearly in PHP at that point. I'm sure I'll put a solution together now that I'm back on track.

            Thanks!!!