Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] Newbie "IF" statement



******    message to minivend-users from Shawn Butler - Blue Planet Corp <postmaster@thetechpage.com>     ******

Im going crazy here trying to figure out
a simple "IF" Statement.

I made a UserTag that works great, it looks
like this:
UserTag ulnadmin   Interpolate
UserTag ulnadmin   Routine <<EOR
sub {
  my @ulnemployes;
  @ulnemployes = ('shawn','dan');
  foreach (@ulnemployes) {
    if ($_ eq Vend::Util::read_cookie('MV_USERNAME')) { 
      return "Yes";
      } else { return "No"; }
  }
}
EOR

So, when I put the [ulnadmin] tag in the middle
of the page, and shawn is logged in, I get "Yes"
printed to the page. Perfect.

But when I try to put it in a "IF" statement in
the very same page like this: [if [ulnadmin] eq "Yes"] 
the "if" never evals as true. I tried putting 
[ulnadmin] in quotes too, same thing.

Anyone know what Im doing wrong? Probably something
simple.

Thanks!


-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: