I have a method to read the data from the database. The code is completely working, but there is a problem, it is if I run the code and there is no data in the database, I get the error: And my code: PHP code: I previously searched the old topics here and tried all the topics and problems similar
Having problems centering a textbox in CSS
I have the following code in PHP: This code creates the following box: The respective CSS code looks like this: However – no matter what I do – the textbox over the picture (as you can see in the picture above) is never perfectly centered. How can I center the textbox over the picture? Best Answer…
How to submit values in form and save them on another page [PHP]?
so I have 2 pages . On the first page I have a form , where I need to input values and the other page receives those values and saves them. Then I go back to page 1 , input new values and those new values get saved again on page 2 , right next to the previous values. Basically
Laravel 8 file upload validation fails with any rule
I want to validate a file upload but with literally any validation rule, I get “The (name of input) failed to upload.” I’ve seen this issue in a few places but none of the solutions worked for me. I’m using Laravel 8.0, php 8.0.2, and nginx/1.18.0 on ubuntu. Controller: Blade file: If …
Woocommerce Additional Information Tab: Adding product custom field value
I have the following code working to create the Additional information tab in woocommerce with my own values however I want to pull the information from the built-in product custom field. This is the current code I use to output the custom field, how do I output this in Value 1 in functions.php file in the wo…
Querying an SQL result grouped by month
I have been learning PHP and SQL but have a question. I want to count the data where the year is 2019 but then want to populate a JSON array for each month. I have started by creating the following SQL and PHP code: I do not however know how to run a further query on this result to retrieve
Cant seem to get the first dependency to run on AJAX call
I am having significant issues trying to get the AJAX to fire on this PHP code. I can get the first field populated without issue, however the AJAX call does not seem to populate the first dependency (and therefore the second). I am an AJAX newbie (and have googled extensively) but cannot seem to crack this o…
Change WooCommerce thankyou page title based on order status
Attempting to change the title of the thank you page based on specific order statuses, by combining a filter and action as follows: but I have tried multiple ways to combine the two and without any success. Answer You can use the following to change “Order received” page title based on order statu…
How to display unique results from an array with two conditions
In $data I have the following values: Result I want unique results for id and id_orders. I want 3 out of these 9 results. I have tried this, but it helps on one id_orders condition. PHP code Do you know how it can be different to make it work for two? Answer You can do it by keeping track of
shopping cart with PHP and connected to the MySQL
Good evening, I am currently working on the implementation of a shopping cart through PHP and MySQL, I am getting the following error at line 172 onwards, I have been looking at the quotes but I cannot find the problem, what could be the solution to this? I have been changing this cart from a mysqli version o…