Category "php"

How to use a value from $_POST as the parameter of an in_array function?

I have built an HTML form to search through a .csv and return all entries that match the specific input string. My aim is to be able to search through a .csv an

how to use php and volt parameter together?

I am using Volt and PHP in phalcon volt partial I want to iterate a loop and in the loop I have php code that accept a parameter this is my code {% for header i

Where to find CPANEL object file Path on Localhost and Live server

sorry if my question might sound silly. I am trying to create an email address with Cpanel UAPI with LiveAPI.php but I seem to be lost on some codes. The docume

memory limit exhaused - symfony 5 with flysystem [duplicate]

I try to provide Download Streams for my Project, but always run into memory limit exhausted error on files larger than 128M. php memory limit

htmlpurifier - How to escape self closing tags?

I have noticed that when passing html string to htmlpurifier, it replaces all self closing tags either by open and closing tags or by just open tags example Be

Laravel Json Reponse running really slow

My code suddenly started working really slow. I don;t see any reason, noting was changed or updated. return response()->json([ 'status' => 'su

PHP if result equals this, then replace

I'm calling the 'Referring site URL' in a post array... data34' => $lead->getReferringSiteUrl(), But need to replace it with a friendly name. i.e. If www.

Laravel Carbon difference in time

So I have this table with a start time and an end time and I am calculating hours. This works just fine unless the end time is midnight. I have TIME fields in m

How to use mysqli prepared statements?

I am trying out prepared statements, but the below code is not working. I am getting the error: Fatal error: Call to a member function execute() on a non-objec

Issue with saving custom field (custom post type) in WooCommerce coupon usage restriction tab

I'm trying to add a new field in the usage restriction of coupons. Here is my code: function add_coupon_cpt_field() { $value = get_post_meta( $post->ID,

My message got duplicated when reloading the page [duplicate]

I have a problem with my PHP and MySQL code. I was creating a private messaging system but unfortunately, each time I reload the page, the las

Truncate string with html tag in Laravel

I want to truncate in Laravel text from database with HTML Tag, for example: <p>Hi. I want to say about my story. </p> I found a method: {{ Str::li

Not able to complete a transaction with Amazon Pay in PHP

I'm struggling to complete a Amazon Pay transaction in PHP. First of all I followed this guide https://developer.amazon.com/de/docs/amazon-pay-checkout/get-set-

How do I handle this Nested JSON in PHP as below? [duplicate]

I've a GET request in PHP that receives data in JSON as below. { "data": { "id": "1cc58ad2-ccfd-4ede-a6a6-35809c81cb8a", "

How do you hide the row actions behind the 3 dots in laravel-admin package?

How do you create the row actions to be like this (screen shot from documentation) To see just 3 dots and click on them and then show the buttons? This is the

Calculate an IPv6 range from a CIDR prefix?

I am able to do this with IPv4 using code snippets from various online sources. I was wondering if there was a way to do it with IPv6. Basically I just need a f

Error Missing required parameters for [Route] after upgrading Laravel 5.8 to 6.0

After upgrading Laravel 5.8 to 6.0 I get the below error: local.ERROR: Missing required parameters for [Route: playlist-song.show] [URI: public/admin/playlist-

Laravel blade set value on input with ternary if

I have a template that change the style if into an input is set the "value" attribute or not, even if it is empty. For example this: <input type="text" class

Display user name from another table Laravel 8

Hellow guys, so I have 2 tables is Listings is Users in Listings I have some columns, one is user_id, and is related to users tables. I want to display the user

ESP32-cam pixel_format

I am using a ESP32-cam with Arduino IDE ver 1.8.6. I'm working on a project with PHP and esp32cam. In my code, the same esp will detect motion then read a qr c