php forms

I am building a form in html which then goes to a php script and send the completed form,

The form makes calculations with javascript then sends the form to me and also a copy to the client,

However, most of the form is ok appart from the calculated bit, it will not send the result of the calculation by e-mail with it being in tags, it will however send if i use tags but this gives me the problem of not being able to use “if statements” on this part of the form,
Can anyone help or advise on this issue ?

Regards,
LightBulb

Hi LightBulb,

PHP codes are executed before javascript. Since you mentioned that you use javascript to perform the calculation, the php code, will send the email before the javascript executes. Therefore you wouldn’t be able to get the result. I believe you can perform the calculation with php. Try to use php to perform the calculation instead of javascript.

Regards,
developer.dex2908

Sponsor our Newsletter | Privacy Policy | Terms of Service