I have a view in a laravel project where I have to print the sum of some array columns. I Have this kind of code to achieve the result: It works fine. But there is a problem. The numeric columns have a formatted italian currency number like this: 1.267,76 € So the sum is printed wrong, because numbers have wr…
Tag: php
React can’t get response body from PHP API
I’m trying to send a POST request to my PHP file and get a response. The response is sent with code 200, however, I don’t see what PHP returns. Here is my react code: And here is my PHP code: Logging response on console returns me: I can’t get the “data” out of PHP. Answer
Form post not including the select input
I am trying to make a form to register the number of drinks that are taken from the fridge by a certain person. Currently I have three drinks in my db, meaning that I create 3 select tags and 3 input fields for the number of drinks per drink (e.g. coke, coke zero or coke light). In the code (somewhere
How to print multiple row down JSON result?
I have a JSON result like this: Here the function: and I call the function from here: I pass it to WhatsApp chat, output like this: How to make it to down like this: Answer Not sure to understand but try this :
sql, effecting different rows with different buttons
i have a project looks like this. i want to view picture then want to write something about this picture. the “gönder” button should effect the right above picture. i want to add these to …
I have a problem with my laravel query builder
I’m using laravel as my web project, and I have an issue when I update my database. I have an error message on my postman after posting data. Here is the message. This is my function code to update a row on a database. I don’t know what’s going on with my code, i search for ‘transact_i…
MongoDB Aggregation “group” with “max” field within a sub-array
Using Compass initially, I then need to convert it into the PHP library. So far, I have a 1st stage that filters the documents on 2 fields using $match: comp.id (sub-document / array) playerId Code is: $match (from drop-down) This returns 2 documents. The document has a sub-array holes, for the holes played i…
Undefined variable $credentials, tried several solutions but couldn’t understand my mistake
I’m a beginner, learning Laravel. I was trying to create a web page which will show me my login Info(like email and password) once I log in. In my controller part I passed values using route parameter, but when I call it in blade, it shows ErrorException Undefined variable $credentials (View: …..n…
What’s wrong with that simple php class? [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed las…
Customizer Object Header Background image issue (HTML to WordPress)
i’m trying to convert html template into wordpress with more easy to edit, for this i do try to add front page header slider images and content into customizer object. Like easy to edit for users. user can go to Appearance>>customize>>Home Page hader>> and then there he/she can choose …