The problem I’m dispatching a job to execute an action that needs a resource ready to be correctly executed, so if it fails it needs to be retried after some time. But what really happens is that if it fails, it’s not executed ever again. I’m using Supervisor to manage the queue and the data…
Wrapping PHP and HTML in PHP function to create a shortcode
I’m trying to create a shortcode for use in WordPress, that will allow me to use PHP and HTML functionality. I have created the shortcode and it works using simple echo Hello World, but when I try to …
Getting Values from Laravel drop-down form
I have a simple drop-down in a form. The form is: In the view function in the controller the array is: The store function in the controller is: The method, however, stores the position of the values instead of the value itself. So, if I do a dd(request()->all());, I get: How can I get the values instead of…
How to connect wss via ReactPHP components
I have a URI that works well with a js implementation, built as: “wss://domain” When I want to implement a subscriber for this socket as below: $loop = Factory::create(); $…
Add whole xml child new element Php
I have this XML file with many child nodes, and I have this PHP code, but this is only adding the first node. I want to add the whole XML in name is node child. Current XML: …
Choose multiple data from datalist dropdown
I have this datalist, and right now I can only choose a signle variable, and this variable is sent with a form, and used in a sql query. But my users want to be able to pick multiple data from the datalist, but how can this be done? Can it be done by a checkbox for each option or? Part
Using ternary operator in echo?
How come I can use echo like this: But can’t use it like this Answer The ?? Operator in PHP is the Null Coalescing Operator: Since in this case expr1 is false but is set, this expression returns Boolean false. Compare: Echo does not output when passed Boolean false.
composer require phpoffice/phpspreadsheet don’t work
initially, I needed a library that will help me upload data to Excel, found this library and then there was a problem i try to install composer require phpoffice/phpspreadsheet but i have problem I don’t understand where the error comes from, because there is a dependency “ext-spltype”: “*&#…
Delete MYSQL DB Entry via PHP / HTML Button
Hey. Iam learning PHP and MYSQL atm. So i wrote already code which will display everything from my database nicely into HTML. I create also a button which says Delete. Now i want to write a Code which actually Deletes the specific entry (all have an ID ) but iam kinda lost. i know the command is: $sql = ̶…
Keep button disabled till the current page reloads (using Jquery)
I have a search bar in index.php and when I type an ID, the SQL data is fetched from fetch.php. The fetch.php contains “AddToZip” button for each row of SQL data. When I click on a selected …