Category "php"

How to extract id from json response array

How to extract id from this response. I tried like this But return blank page. Below is the response what I'm getting. <?php $res = json_decode($sentMessage

How to add unique ID when inserting data in AWS Timestream?

I am inserting some data in Timestream but I cant figure out how to have a unqiue ID. $date = new DateTime(); $time = strval($date->getTimestamp() * 1000);

Selenium keep php file from loading

I have a problem that gave me nightmares for couple of days. I am trying to run some python script from a PHP file. I am using wamp64 for hosting. Python script

add ssh on arch linux [closed]

I am trying to access with ssh in to bit bucket . I am able to access using my key - id_rsa . But I am trying to make a different key for bit

Adding product description to shop page

I want to add the product description / Additional information (dimensions and weight) to my client's products on the shop page. It's an online art gallery and

JavaScript - Character counter for multiple textareas

I have a form on my website with several different textareas. HTML/PHP foreach ($bla as $blabla) { .... other php-code (not relevant) .... echo '<textare

Problem in message section in orders of product prestashop 1.7

Somebody know in what phisical file in prestashop 1.7.5 (TPL) appear the message sections of product orders? i need modificate the line where show the message (

Laravel merge image by path to Request for validation

I'm very new to Laravel. I'm trying to integrate temporary image upload to my forms. What I want to do. When the user selects a image the image gets uploaded te

php curl login not work, code tested with other site

I have a problem with curl remote login, i don't know what the issue , tried the code with other site working but with my customer website not working function

how to share the variable to different function on the same class

I want to print what I input in wordpress, but I still not get the variable from different function in the same class The following is my code: class Test{

I have a error to pass my datta from blade file to Controller

This is my code in blade file : <form action="{{ route('user.delete') }}" method="Delete" class="row g-3"> @csrf <div class="col-a

Laravel Lighthouse-PHP GraphQL (Server cannot be reached)

I'm using Laravel - Lighthouse-PHP GraphQL server, and when I deploy it to production, I have to write public in the URL in order to work: https://example.com/g

Paytabs php integration

Im trying to get Payments working using the PayTabs gateway in native php. It works, for the most part. the main issue im having is the callback file, I've mad

Return html wrapped template part Ajax call Wordpress

I've built a custom post filter in Wordpress using Ajax. function filterPublications(filters, filterType) { filters = JSON.stringify(filters); $.ajax({

MySQL connection not working: 2002 No such file or directory

I'm trying to set up WordPress. I have Apache and MySQL running, and the accounts and database are all set up. I tried to make a simple connection: <?php

How can I change the shipping class to flat shipping? (woocommerce)

I'm working on hiding free shipping when there is a fixed price shipping amount based on certain products. This code is working and after certain sum is also di

How to extract and access data from JSON with PHP?

This is intended to be a general reference question and answer covering many of the never-ending "How do I access data in my JSON?" questions. It is here to

Test an array and random value PHPunit

I have a little problem with my unit test and an array generated "randomly", I have something looking like this : return [ 'foo' => $this->faker->sent

How can we handling server crashing for PHP site?

I know crashing web server is a network related problem, but as I have responsibility of a PHP web site, so I must be care about reliability or availability of

How to covert youtube link into embed link in Laravel and validate that field should contain only youtube link

<!DOCTYPE html> <html> <body> <h2>HTML Forms</h2> <form action=""> <label for="fname">You tube link1:</label>