I have some files (mp4/pdf/etc..) that I want to deploy to my webserver, but I want access to be restricted so only users who have been authenticated can access them. The server is running centos 7 …
Tag: php
Merge Arrays But Join Corresponding Keys
I am trying to achieve the following functionality: There is 5 textareas, the user inputs several words on different lines into the textarea, on click of a button it creates arrays from these …
How can I delete 1 row from a table using a submit button?
I am using a foreach loop to display my data. Im getting data from a table with reservations, which the customer is able to delete. This is my current code: if(isset($_POST[‘verwijder’])) { $resid= …
Get WooCommerce product purchase date from a product Id for a user Id
I have faced a problem. I need to get a specific product purchase date using the user id and product id. Using “Checking if customer has already bought something in WooCommerce” answer code, it checks …
How to restrict a div for on sale products in woocommerce
I have made a div with a specific class that shows the sale percentage of a product that is on sale. But i want to remove this div when the product is not on sale. I don`t know how to write the php …
Sort results from high to low float array – wordpress
Maybe this should be very easy but I am a bit lost on how to sort this data in a good way. I got this query in a WordPress template to get some post_meta: $args = array( …
Split array with equal indices
I have a result array which is formatted like the following: array(6) { [0]=> array(3) { [“company”]=> string(1) “A” [“uf_prop”]=> string(2) “GO” [“qtd_prop_uf”]=> …
else, elseif,else statement is not working with fwrite in php
i want to write expiry date in a text file with respect to condition but when i echo in browser, it works fine but at the same time it is not writing in text file. Here is my code: condition is based …
How come I am unable to get the output for tax for my code?
Write a function to compute the discount and tax when you pay for a shopping items in a shop. Discount is 20% if the total order > $200, else the discount is 0. Tax is 7% of the total order after …
Format the json encode just like on laravel php
Supposed I have a query that gets the image from a certain tweet [ { “pic”: “/upload/15680712995mb.jpg”, “tweet_id”: “48” }, { “pic”: “/upload/1568071299test….