Category "php"

preg_match_all for atttach bbcode

I have two types of bbcode: [attach]1234[/attach] [attach=full]1234[/attach] $message = 'this is message with attach [attach=full]1234[/attach] I want to remov

insert zk log check in and out to one row in database

I am retrieving data from ZK attendance device using zkteco-sdk-php. The out come is like this UID ID NAME STATE DATE TIME TYPE 55 275 Employ1 Fingerprint 19-0

Laravel Migrate: "Column Already Exists" 1060 Duplicate Column Name

This is a fresh laravel app that I am using to learn. There is no current table as this would be a fresh/first time migration. Why is it giving me this error:

Where i can add redirect page in php?

Hi in the below code I want to add a redirect page in both cases failed or success. Where do I need to put the code? <?php // (A) PROCESS ORDER FORM if (is

Laravel Many To Many Get element that I dont have a relationship with

In laravel Many to Many relationship like the one in the Laravel Documentation example. https://laravel.com/docs/9.x/eloquent-relationships#many-to-many users

Use PHP to populate the images and names of the images into this slideshow code

I'm struggling to create a php gallery slideshow and was hoping someone could recommend how to do this part.. The below code is taken from w3schools and works w

Symfony - Dispatch event and listen in controller when route requested

I don't know if it's a good practice or what ever, but I would like to dispatch an event when an order is created, then I wish catch this event inside a control

Drop or Paste file on the Textarea

I want to make a message input like this. But I have a question how to get file data, which I drag & drop or Ctrl+V on the textarea to upload. I am using R

Laravel Livewire wire:click not firing

I am working on an e-commerce platform based on Laravel and Livewire using the bumbummen99 shopping cart. My problem is that I can only add items to the cart, b

My php code loops and doesn't explore my database [duplicate]

Hello I'm currently trying to create a page based on a database under mysql that would update itself for a client. However what I'm trying to

Wrong namespaces assigned by PHP SOAP Client

I have little to no experience in SOAP. And I am interacting with a third party wsdl web service. For this I use PHP's native SoapClient. When I send the reques

Restrict use of coupon if customer have used related coupons in previous orders in WooCommerce

I am looking for a way, to limit coupon usage and to display an error message if a customer have used related coupons in previous orders before in WooCommerce.

WordPress change upload_dir for specific files to root dont work

I would like to place PDF files uploaded via the media library in a separate folder in the root directory. I have already developed a filter for this and the fi

Consume azure event hub messages in PHP

As per the issued solution on Azure/azure-event-hubs-for-kafka/issues/51, I tried to use and consume a message but it came out with no luck. Please have a look

XAMPP phpMyAdmin - Error when exporting database (windows)

I was trying to export my database from phpmyadmin but it said in the browser couldn't upload a file when I tried again and it loaded to an HTML file. index.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