Category "php"

How to use PHP natsort to sort out mysql records

I have been trying to sort out my mysql records with mysql queries but seems like its just impossible to do it in the natural order. I have values such as a1, a

Flutter http post request to a PHP file

I am using Flutter for mobile app development. I need to make a POST request to a PHP file in order to save data in my MySQL server. However, I check the reques

how i can capture a json value if have a lot of the same value

i get this json response [{"app_id":"com.mojang.minecraftpe","description":"Millions of crafters have smashed billions of blocks! Now you can join the fun!"

How to fix: PHP Startup: Unable to load dynamic library 'php_pdo_sqlsrv_80_nts_x64'?

I get this error while attempting to run a php command from cmd.exe on Windows 10 pro. Looking in the ext folder, I can see I have the dll. I also have this li

Wordpress | echo attribute_name and _value

I am using flatsome theme and i have a theme action hook called flatsome_product_box_after. Basically he is located after the product picture on my Shop Catalog

I have some problems with the Login (Laravel)

I'm doing an application and I need to do a Login. I already do it, and it was working until yesterday, but today it stops work and I don't know why. I was sear

Contact Form 7 - Conditionally/Dynamically Attach Local Files to Email Based on Input Selection

I have a number of checkboxes that indicate the item that is ordered through our online order form system. For each item selected there is a corresponding .pdf

Remove '.php' file extension but still validate paramaters after trailing slash?

I've been searching for how to do this, and I haven't been able to get anything to work yet. I want to remove the '.php' file extension from all files that have

Regex Error: A lookbehind assertion has to be fixed width [duplicate]

My pattern works in JavaScript. (?<=(?:username|Email|URL)(?:\s|:))[^\n]+ However, when I try to use it in PHP, I get this error: A lookb

Join columns of Day, Month , Year to calculate age

public function patients_view($id) { $patient = Patients::where('id', '=', $id)->first(); // .... } I just need to view the age. Thanks , im usin

How do I check all the redirects of a URL and get it as an array?

I'm making a site which checks all the URL redirects, just like wheregoes.com. This site doesn't provide any APIs. I have to get all redirects, then select the

ACF Pro - Field showing up in backend, but it's not saving (disappear on refresh)

I have a website with more than 15 ACF groups. On one of them, there's a repeater and the last of 6 fields is a URL (I tried switching it to Text, same result).

Replace substring till space is found after specified position in PHP

I have this main string $string = "This is a sample text"; $substring = substr_replace($string, "", 11 , 6); Output: This is a text I'm passing $string varia

Ajax not properly sending Session variables

I am very new to AJAX and PHP and am currently working on a small website where I initialize php objects as session variables. The functions and objects are all

Remove billing address (only show shipping address) in certain WooCommerce email notifications

The action 'woocommerce_email_customer_details' includes both the billing and shipping address data. I only need the shipping address. How can I achieve this? B

download file to my server with php with a url without file name

I can download a csv file via a fixed url. The url just doesn't have a file name. When I open the url in a browser, the file export.csv is generated and after a

Display of product attributes the same attributes group into two sections

I would like to divide the display of product attributes into two sections (front). Create two arrays, one with attributes with "premium" in the name and the ot

Get order list filtered by greater than by specific order id in Prestashop rest API

I am newer in Prestashop, I need to get the order list in which orders should be greater than a specific order_id using Rest API. Let suppose there are 100 orde

Change options when I select a category using Javascript (Country/State)

Im trying to hide some options when I select a different country. These options are the states of this country. But, when I select the country, it doesnt showin

How do you make button save form data on a csv file and redirect you to a new page at the same time?

I am trying to make a button that saves form data on a file and redirects you afterwards, but although the save function works just fine, the redirection doesn