Moonsoft Software Solutions

Email - random errors

Started 15 May 2012 · 2 replies

  1. moon_474
    Hello,

    I am having a strange issue with the "send an email" feature and I am uncertain what is causing it. After the formula is calculated the send an email box pops up and when i enter an email address and click send a random error appears.

    Sometimes the error is just three numbers like; 901, 121, etc and sometimes its the sum of the form. I does not say email sent or anything like that - but heres the storage in it all, the email does get sent.

    Here is the code that I am using for cubic weight calculator, figured I add this just in case something was wrong here:

    $cubic=$len1*$wit1*$hei1/166;
    $actual=$act1;
    $sum=$cubic;
    if ($actual > $cubic)
    echo ($sum=$actual);
    else
    echo ($sum);
    $sum=number_format($sum,2);
    $cubic=number_format($cubic,2);
    $total=$rates1*$sum;
    $total=number_format($total,2);

    Thanks
  2. Moonsoft support
    Hello,
    checking your code, maybe you're getting that strange output due to the 'echo' instruction you're using. In fact, you don't need to use it at code section to have the values assigned properly. So,

    if ($actual > $cubic)
    echo ($sum=$actual);
    else
    echo ($sum);

    is the same as

    if ($actual > $cubic)
    $sum=$actual;


    and maybe you will get rid of that output containing values.

    Hope this helps, best regards
  3. moon_474
    That worked perfectly! Thank you very much :)

    I'm not a PHP coder by any means, I knew it had to her something simple (for a coder anyway)!

    Thanks again!!

Still stuck?

Customers with an active license can open a support ticket.

Log in to open a ticket