Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: Help with an If statement

  1. #21
    Join Date
    Mar 2004
    Posts
    2,224

    Default Re: Help with an If statement

    yeah, u could use php to do this
    PHP Code:
    $distr=$_POST['distr_2'];                           
    if (empty(
    $distr))
      
    $distr=$_POST['other_dist']; 
    but that is pretty much wot formmail is doing anyway

    i think the problem must be in ur php code - it must be breaking things

  2. #22
    Join Date
    Mar 2010
    Posts
    40

    Default Re: Help with an If statement

    Thanks crabtree. I'll try that in a minute, one thing that I remembered is that I had problem with "realname" populating and Russell said that I needed to be

    $realname=$SPECIAL_VALUES['realname']; so I tried that with distr.

    $distr=$SPECIAL_VALUES['distr'];

    but that didn't solve it. I will work with the if statement. the stupid this is that it worked fine before I tried the drop down box, actually using fmhookprefinish.inc.php

    Usually, it is something really small and stupid. Thanks again for your time.

  3. #23
    Join Date
    Mar 2010
    Posts
    40

    Default Re: Help with an If statement

    The if statement worked!!! again thanks for all of your time.

  4. #24
    Join Date
    Mar 2004
    Posts
    2,224

    Default Re: Help with an If statement

    bingo!

    my mistake...

    derive fields don't get put back in $_POST

    so if u want to access the derived field called "distr", it's:
    PHP Code:
    $distr $aCleanedValues['distr']; 
    so, u can go back to the deriving stuff, and then just change that one line ($distr=$_POST['distr'] in ur PHP code

  5. #25
    Join Date
    Mar 2010
    Posts
    40

    Default Re: Help with an If statement

    $aCleanedValues, $SPECIAL_VALUES, its always the little things.

    Thanks again for all of your time and help, hopefully, I've got enough braincells to remember this the next time I need it.

  6. #26
    Join Date
    Mar 2010
    Posts
    40

    Default Re: Help with an If statement

    A friend suggested this solution which would eliminate some confusion, but I haven't figured out how to adapt it for me.

    http://javascript.about.com/library/blnav8.htm

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 29-Oct-2008, 12:45 PM
  2. Replies: 0
    Last Post: 20-Feb-2008, 06:52 PM
  3. Replies: 4
    Last Post: 05-Jul-2007, 04:07 AM
  4. Replies: 2
    Last Post: 05-Jul-2007, 02:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •