this is the real code I am doing the first post contains the same problem, as you can see the form 1 buttons is to control the iteration of the $_SESSION[‘clicks’] value i am using sessions in this …
Problem modifying JSON config file inside a container (PHP)
I have a problem modifying a JSON config file within a PHP7.4 container. Im supposed to be able to configure an HTTP GET request to make adjustments to this config file. Ive ran the code on a PHP test server, with no issues, but cant seem to get the file permissions modified within the container. Ive added th…
PHP Page Navigation Optimizing – Setting “active” on nav items
I have my nav.php setup with code like this. This is to determine the page and then set both the navigation header and the item as active. I then have the following html code. How can I optimize this as I feel this is horribly done and outdated. I’ve been working on cleaning up all my older code and thi…
XML file/data handling with PHP
I have a XML file as a master file (master.xml) and its content is blank. I have a loop in which i get some data and …
cURL shows since few days blank page
i use curl. Since a few days curl show’s me a blankpage. The mainpage /kenteken/ he show’s without problem. But if there is text like /kenteken/TF172H it show’s a blankpage. I hope some one can help. Answer If you go to the URL in your browser with the Developer Console – Network tab o…
Include HTML markup from another file inside PHP file
So this is the method that I am using and it’s kinda working, but I don’t think that it’s best practice and just seems kinda off, so I wanted to see if someone knew a much better and/or cleaner method on importing HTML markup that will be located in two locations. So let’s say that I h…
How do I redirect my login link to show the landing page when someone logs into his account
I have two login links that appears on the navbar and the other one appears when a user clicks on the checkout button. I.ve configured the links at the logincontroller for the checkout page to be like …
Several issues when using woocommerce_get_availability hook
Im trying to show an ‘out of stock message’ on the single product page for products that are out of stock. I have this code in my functions.php I get the following error: Notice: stock was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-hea…
Laravel – How to display only those Category who have products?
My aim is to not display the category which don’t have any products as of now. I have a drop-down list having all the category (level down to sub-category as well) which giving me the following results. But, I want to achieve following results The database tables are following Category model I have trie…
Unable to create new answer in Symfony
I’m making a a app in Symfony. I get Entities Answer and Question which are related. I want to enable users to add the answer to the question but I’ve got the problem with getting question_id to AnswerEntity. Here it what I came up with: Answer Controller AnswerForm: and AnswerEntity The error is:…