Hi Jason, the emails are on the standard record update page, which contains all the usual account details - name, email address etc - but also contains checkboxes to indicate how far in a signup process they've come - order received, contract signed etc. When an administrator updates the record by ticking 'order received', this sends an email to the contact telling them what to do next. Once they've done that and signed a contract, the admin person logs in again and ticks the 'contract signed' box which sends another confirmation email. However, this also resends the 'order received' email.
I've tried various methods of preventing the Order Received emails from being sent when the Contract Signed box is ticked but nothing's working - I tried this to get it to send the Order Received email only if the value in the ContractSigned column is 0:
<?php if(isset($_POST['OrderReceived']) && $_POST['OrderReceived'] == "1") { ?>
<?php if ($row_WADAclients['ContractSigned'] == "0") { ?>
[Universal Email script for Order Received email in here]
<?php } ?>
<?php } ?>
I also tried this as suggested by you in this thread: http://www.webassist.com/forums/posts.php?id=3983 as it's basically the same issue:
<?php if((isset($_POST['OrderReceived']) && $_POST['OrderReceived'] =="1") && (isset($_POST['ContractSigned']) && $_POST['ContractSigned'] !="1")) { ?>
[Universal Email script for Order Received email in here]
<?php } ?>
That doesn't work either - both the Order Received and Contract Signed emails get sent.