Category "php"

How can single user registration and login work for separate Laravel applications

I need to set up a single user registration and login page to work for separate Laravel applications or projects, such that if a user registers on the first app

How to set logo on the center of qrcode tcpdf from html response PHP?

I am using TCPDF library to generate pdf file using PHP. They also have feature to create qrcode. This is my syntax $style = array( 'border' => 0, 'v

WooCommerce php 8.1 + WordPress 5.7.2

I have an issue with using new PHP 8.1 on WordPress 5.7.2. Everything work just fine, until turn on WooCommerce 5.3.0. Then whole site fall down. Here is error

Populate dropdown2 from onChange event of dropdown1

I need to write a code where i need to populate a dropdown1 from mysql table based on the selection of another dropdown which also where in need to give values

Disable auto-complete fields (auto-fill) on Woocommerce checkout except for some fields

I use below code to disable Autocomplete Fields in the woocommerce checkout page: add_filter('woocommerce_checkout_get_value','__return_empty_string',10); Abov

Set MySQL fetch mode globaly

We have recently migrated our application to a new server. Since our migration we are experiencing a lot of PHP message: PHP Fatal error: Call to undefined meth

Missing Authorization key in headers array in laravel Shopify app using shopify cli

I had to install shopify-cli for develop shopify app with laravel. installation and test app are created successfully but when am i calling the API of shopify i

how do i fix 400 (Bad Request) error about admin-ajax.php

I want to deliver html value through JS to PHP handling, but I still got error, 400 (Bad Request) . This is HTML: </div> <form class="row g

Method to recursively search for a file in directory and subdirectories doesn't find the file

I wrote a function to find a file in a specific directory and its sub-directories. You can input the filename with or without extension (basename vs. filename).

PHP - 8.1 upgrade and packages in conflict requirements [duplicate]

In my PHP project I am updating some composer packages as I upgraded the PHP to version 8.1 I have some Symfony packages that I am updating..

Symfony find user by role (JSON array Doctrine property)

I am doing a small project where I have an entity with a roles property which consists of an array. What I am trying to do is, in some controller, find an exist

Extract individual PDF from a portfolio of multiple PDF documents

I have a web application built with PHP and JS. In this app I make different operations with certain files and i encounter the next problem: The user needs to u

i have problem with compress my images please advise me best way, this in my code

I am trying to develop an image_compressor web project. I am confused about the best image type for faster page loading speeds and best compression practices. P

JavaScript event.preventDefault() submit button data in _POST

There is something I can not seem to find documentation on: I have this form with multiple buttons. The buttons have their own actions associated with them and

How can i parse php functions from JSON string variable?

I want to extract and run PHP functions from a JSON string variable. my string variable is something like this : $str = '"field_table_id": { "element_name":

How to hide buttons based on your "job"?

I am creating an app and I want that the buttons appear based on your $job. There are 4 jobs, which are all in mysql databases: student teacher staff principal,

Woocommerce subscriptions: Assign different subscrption_id to each item in cart

I am using Woocommerce with the Woocommerce Subscriptions plugin and I am trying to assign different subscription_id to each item in the cart. So far I have man

How to properly fix - Cannot use empty array elements in arrays

I have the code below but it showing an error "Cannot use empty array elements in arrays". It seems that the issue is in this line }), collect(json_decode($pos

Symfony / twig - Form with master-detail in it .. How to?

I'm coding a master detail page with Symfony 5 and twig I have table product, and another options When I create a product, I want to ask for name and have to ch

join(): Argument #2 ($array) must be of type ?array, string given

So I am a beginner working on a project with symfony 5.2 project with php 8, and I have been trying to run this command symfony console doctrine:fixtures:load