View Single Post
  #1  
Old 03-31-2003, 06:50 PM
 
lesmckeown lesmckeown is offline
 

Newbie
  
Join Date: Mar 2003
Posts: 3
 

Default $fillerror 'or' statement?

Hi Guys -

Sorry in advance if this is the dumbest question in the world...

I want to enter an 'or' argument for checking completion of a form [I want the customers email address OR their phone number, but don't want to mandate both]. Plus I want to mandate a 'body' - a question, comment, whatever...

It looks like a line like:

$fillerror = (empty($contact["email"]) || empty($contact["phone"]) || empty($contact["body"]));

...constructs an 'either' argument - if either email or phone or body is blank, an error message pops up.

I don't know the syntax for "$fillerror = [either phone or email empty] or body empty" - can anyone help?

ps, for future reference, is $fillerror Smarty syntax, or php, or is it something specifically x-cart-y?

Cheers
Reply With Quote