Path: csiph.com!weretis.net!feeder8.news.weretis.net!news.mb-net.net!open-news-network.org!.POSTED.50.226.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Form processing issue Date: Sat, 16 Jan 2021 00:44:16 +0100 Organization: PointedEars Software (PES) Lines: 50 Message-ID: <12686446.uLZWGnKmhe@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit Injection-Info: gwaiyur.mb-net.net; posting-host="50.226.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch:178.197.226.50"; logging-data="20161"; mail-complaints-to="abuse@open-news-network.org" User-Agent: KNode/4.14.10 Cancel-Lock: sha1:5sejbhVp67BStrOSgA5Mc2L6GYw= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg== X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. On Friday, January 15, 2021 at 11:57:35 AM UTC-6, The Doctor wrote: >> Got this form doing >> a calculation as follows: >> >> [...] >> >> WE are trying to add in fractional stuuf >> >> put the fraction in this case is >> coming out as 52.5.00 when it is suppose to pass >> 52.50 ? >> >> Given the above , how do I fix this? > > TL/DR. Can you make this more succinct? > > The mixing of PHP and JavaScript makes this painful to look through. You can view it in/copy it to your favorite editor for syntax highlighting. But I keep thinking that syntax highlighting in a newsreader would be really helpful. Having had a quick look at the code, I have to say that they are doing virtually ALL things in the worst possible way (probably amateurs, but still). Some highlights: - all PHP code (not just template code, which can be forgiven) in the template - mysqli instead of PDO (at least they didn’t use the old “mysql” module) - SQL credentials in the source code *facepalm* - SQL queries in the source code *facepalm* - disabling the user’s status bar - Fetching and displaying results row by row instead of in batches - comparing strings as if they were numeric values :-D - spaghetti code in event-handler attributes - *inline* jQuery event listeners (so much for "unobtrusive Javascript") :-D - jQuery “change” event listeners to uncheck a checkbox instead of canceling the “click” event :-D - HTML5 declared, but not Valid HTML. Bottom line: This code is complete JUNK. It is a recipe for failure. A hopeless case. DOA. It should be written from scratch before it is debugged, otherwise eye cancer and nervous breakdowns could result. -- PointedEars FAQ: | | Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.