We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7690
    • 166 Posts
    I have a phx if statement, but it doesn't work.


    [+phx:if=`[!checkDansles!]`:is=`[(site_url)][~101~]`:then=`[!eForm? &formid=`shopOrderFormExtra`&tpl=`shopOrderFormExtra`&report=`shopOrderReportExtra`&vericode=`1` &subject=`Nieuwe bestelling` &to=`[email protected]` &eFormOnBeforeMailSent=`populateOrderData`&eFormOnMailSent=`sendOrderToManager` &protectSubmit=`0` &gotoid=`104` !]`:else=`[!eForm? &formid=`shopOrderForm`&tpl=`shopOrderForm`&report=`shopOrderReport`&vericode=`1` &subject=`Nieuwe bestelling` &to=`[email protected]` &eFormOnBeforeMailSent=`populateOrderData`&eFormOnMailSent=`sendOrderToManager` &protectSubmit=`0` &gotoid=`104` !]`+]


    In the checkDansles snippet:
    <?php
    $referer = $_SERVER['HTTP_REFERER']; 
    
    return $referer ;
    ?>


    Why doesn't it work?
    If i put [!checkDansles!] and [(site_url)][~101~] in the document, both urls are the same and correct.
      • 16278
      • 928 Posts
      Whatever else may be happening, you have no chance of success with then=`[!eForm? &formid=` in the middle. That is, both PHx and snippets are using backticks to quote parameters.

      Wouldn't a snippet that uses the runSnippet function work a lot better than PHx here in any case?
      ;) KP