So, I have an HTML/PHP form that has a select list box from which you can select multiple values because its multiple properties are set to multiple. Consider the form method is ‘POST’. But the list …
Tag: php
How to specify the void return type for a constructor
For consistency I’m specifying return types since PHP 7.1, for all methods, including magic ones like __toString, and even when the implicit return type is void like with __unserialize(): When I try the same for constructors and destructors, like this: PHP yields Fatal errors: The only thing I can do ri…
Why is searching not returning results in Magento 1.9 with error messages appearing in nginx logs for FastCGI and Elastica?
I’m running Magento 1.9.4 on Ubuntu 18.04, PHP 7.2 with nginx 1.14 fronting it all. The shopping site is loading and navigable. However, when I search for a term, it does not list the matches in the …
admin-ajax returning 0 – not submitting form data to db
I’m trying to send form data to a table called attendants. I have the form, the AJAX and query created, but when trying to test (when submitting the form), I see a POST http://localhost/rsvp/wp-admin/…
In a WordPress template, how can I detect if the current page is the WooCommerce cart or checkout page?
I would like to have a header banner hidden when a user is in the WooCommerce cart or checkout process. Is there a flag or variable that I can check to see if the current page is in either of these WooCommerce sections? I basically want to do something like the following: I realize I can make a custom page
How to implement photoswipe into wordpress custom theme?
I’m trying to implement photoswipe into my site but I’m not sure how to go about it for a wordpress site.. I’m using acf repeater to display all images in a grid. I’d like to display the photoswipe …
CORS issue in codeigniter 4: Response to preflight request doesn’t pass access control check
I’m making an api with Codeigniter 4 for a react application. Everything works fine in postman but when I make requests with axios (also tried fetch), it gets CORS error Access to XMLHttpRequest at ‘http://localhost:8080/testpost’ from origin ‘http://localhost:3000’ has been bloc…
click button counter for all users PHP MySQL
I think it can be done with php and mysql but I’m not sure, so I ask you. I have a site where every registered user has coins which are saved on the database. I have a page with a button, and each …
How to get the second value in the id to make onchange function?
I want to get the quantity value on change to show in the input, I make it data-cat_id='{$quantity}’ to show, but it cannot work.This value='{$id_book}’ is cannot change to ‘{$quantity}’, because …
(php) change a duration to something useable by my calendar
I have a series of event dates (variable durations) in the following formats: 28 April 2020 3 – 5 May 2020 3 May – 5 June 2020 20 Dec 2020 – 15 Jan 2021 I want to keep these this way, for …