Category "php"

The "client_reference_id" argument is not passed

I use Stripe Checkout (Stripe version 2016-07-06) and I want to recover a personalized data thanks to the argument "client_reference_id" but in the JSON I do no

correct PHP headers for pdf file download

I'm really struggling to get my application to open a pdf when the user clicks on a link. So far the anchor tag redirects to a page which sends headers that are

Create a new line whenever an array value reaches more than 10 characters

Here is my code, but it isn't dynamic. What I need is it will automatically create new line if array value is greater than 10. <?php $limit = 10; $newline =

array_map triple dimensional array [duplicate]

How do I run a array_map on a triple dimensional array? Where I want to "clear" the innermost array? It looks like this: Array ( [1] =&g

javascript html popup window

I am fairly a beginner with javascript. What I want to do is when I click on a button: I want it to popup a window. The content of this window is HTML (actual

Second select load from database after first one is selected

I have 2 select items. In the first one I'm loading the options from a MySQL database table using PHP. The second one I want to load the fields from another t

html-php form submission after validation through JavaScript [closed]

What I intend to do is : first validate a form and then process if some conditions are satisfied. I have pasted the prototype of my code below

Fatal error: Call to a member function prepare() on null problem here

Fatal error: Call to a member function prepare() on null public function __construct(){ require_once('DbConnect.php'); $db = new DbConnect(); $

PHP array_filter with arguments

I have the following code: function lower_than_10($i) { return ($i < 10); } that I can use to filter an array like this: $arr = array(7, 8, 9, 10, 11

PHP: How to solve ob_start() in combination imagepng() issue?

I use the following code to create an image and encode it to base64. There is no direct output of the image. ob_start(); // catching the output buffer imagepng

Check if string contains a value in array [duplicate]

I am trying to detect whether a string contains at least one URL that is stored in an array. Here is my array: $owned_urls = array('website1

Destroy session upon refresh

I am trying to destroy the session information upon refresh. The problem here is that everytime I refresh, the data still appears on the table. How do i set the

php: command not found Command PhaseScriptExecution failed with a nonzero exit code

I updated to Monterey and I am trying to build my xcode project. I have a custom php script that runs in Build Phases and I am getting the following error. /Use

Xdebug can't connect back to Docker host

I've just setup Docker on my machine & have an Nginx/PHP7 (FPM)/MySQL setup all working fine, but having installed Xdebug on the PHP container I can't get i

Why wordpress can't write files using php with xampp in localserver

I am using xampp from longtime without have this problem in my localhost. But suddenly all of my Wordpress product can't write file. It give error don't have ac

SQL to convert multiple rows into a single row of variable length

I am writing a module for drupal6/PHP5 using MySQL (and optionally PostgreSQL). To represent arbitrary sample properties and instrument readings in an experimen

Connect Office 365 use POP3 - PHP

I have a trouble with Office 365 use POP3 method. Currenty, I can't connect to this server: outlook.office365.com port:995 This is my code exampl

Symfony 4 do not build in Production: Attempted to load class "WebProfilerBundle" from namespace

Symfony 4 do build in Dev mode but do not in Production mode while producing the error: Attempted to load class "WebProfilerBundle" from namespace. The WebPr

How to transfer data from magento site to prestashop site?

I was having a website built on magento that I replaced with prestashop. I have the backup files of previous magento website and database of the same. Now, I wa

Laravel UUID generation

I am trying to generate a UUID (not as primary key, just generate one) with the laravel-uuid package. The docs are pretty straightforward, so according to the r