Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #18521

Re: Form processing issue

From "J.O. Aho" <user@example.net>
Newsgroups comp.lang.javascript, comp.lang.php
Subject Re: Form processing issue
Date 2021-01-15 22:10 +0100
Message-ID <i6eelcF29trU1@mid.individual.net> (permalink)
References <rtsl27$2u66$1@gallifrey.nk.ca>

Cross-posted to 2 groups.

Show all headers | View raw


On 15/01/2021 18.57, The Doctor wrote:
> Got this form doing
> a calculation as follows:

> put the fraction in this case is
> coming out as 52.5.00 when it is suppose to pass
> 52.50 ?

Remove the '+ ".00"', you need to use number_format() in php to get the 
right number of decimals, see 
https://www.php.net/manual/en/function.number-format.php


> Given the above , how do I fix this?

I would suggest a clean rewrite of the whole thing, I would suggest 
node.js, angular, or something similar, just see to make ajax calls to 
fetch the raw data in json format from the backend (php or database).

Do not generate dynamic javascript in php, you will just end up with a 
code that is difficult to maintain and of course your teacher will fail you.


-- 

  //Aho


Back to comp.lang.php | Previous | Next | Find similar | Unroll thread


Thread

Re: Form processing issue "J.O. Aho" <user@example.net> - 2021-01-15 22:10 +0100

csiph-web