I am writing a script in PHP to directly import data from a JSON file directly into a MySQL database. My sample data at the moment is pretty small. I have a few questions about it. I would like to do …
Can’t write the right if statement regarding time
I have a database with rows of employee information. In the data I have training dates that expire. I need to compare the expiration date that is pulled to the current date. I’d like to bold and turn …
How do i reference another page in in wordpress theme
I am converting a static an html code to wordpress theme, i want to open another page to open when i click on the anchor tag, how do i go about it. Thanks. Answer In WordPress, links are permalinks: Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of web…
Vue JS real-time client search filter on paginated Laravel results
I’m having some troubles adding client-side real-time search filtering to my Nuxt JS project that pulls data from my Laravel 8 API. My Laravel 8 API uses the paginate() method to paginate my results from my database and return back some JSON whereby the data array contains all the records for the curren…
Sanitizing whitespace in generated URL parameters
I’m having an issue with a PHP page that generates an HTML document. On the page, there is a form that has a <select> box, and each <option> inside has a value with the URL parameters to use when changing the window location when the form is “submitted”. The issue is that I notic…
update return array [“isTrusted” => true] Laravel with Vue3 and Inertiajs
I tried to make Update i made a debug in Laravel 8 like that: Edit and Update function in Controller Vue Template it return the data in the form but the problem with the image file its return that in debug after changing image file and submit: array [“isTrusted” => true] I added in the form lik…
Check if object exist and has property
How can i get something prettier than condition inside condition? Answer You can merge your 2 if in the same : Because if $permission was false or empty ( not exist ) php not execute the following test !$permission->can_edit then u don’t have errors, and you write 1 if.
Sage Pay / Opayo Form integration – replacing mcrypt with openssl
We use the Sage Pay / Opayo form integration to pass customer orders to Sage Pay for payment, then to process the report that comes back. Sage Pay’s example code relies on the PHP mcrypt functions which are no longer supported from PHP 7.2, so we need to update the scripts to OpenSSL. Encryption was cov…
Route exists but doesn’t work and deleted route still works Laravel
Well, I was working on my project and suddenly when I created a new route I get this problem where the route exists but it shows 404 !! so I tried to delete an existing route that is working but when I delete that route still works !! I had this problem previously but I just deleted that route and
Sending and email with the auto Increment number attached to the email using PDO/MySQL
Hello my favorite people! I am trying to send an email after submitting a form, with the AUTO INCREMENT number attached to the email because the AUTO INCREMENT number is the clients Job Card Reference Number. So far i have successfully created the insert script which inserts the data into the database perfect…