October 22, 2024
Chicago 12, Melborne City, USA
PHP

Update two SQL tables from one form (PHP)

I have two tables i would like to update from the results of 1 form that is posted. Table: Rescue Patients Patient ID Name Status 1 Bodger Released 2 Badger Captive Table: Admissions Admission ID Patient ID Disposition 1 2 Died 2 1 Released The form contains a look-up field with 6 options in a

Read More
PHP

PHP cURL unable to set private key file: 'C:\…\cacert.pem' type PEM

I’m trying to run the PHP cURL request example of an API from a Windows/IIS web server Here is the code: <?php $curl = curl_init(); curl_setopt($curl, CURLOPT_SSLCERT, 'C:\...\cacert.pem'); curl_setopt($curl, CURLOPT_VERBOSE, true); $streamVerboseHandle = fopen('php://temp', 'w+'); curl_setopt($curl, CURLOPT_STDERR, $streamVerboseHandle); curl_setopt_array($curl, [ CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30,

Read More
PHP

Stored Procedures, MySQL and PHP

I’ve been doing what I’m about to explain using ASP classic and ASP.Net with MSSQL Server for all that time and it works beautifully! Here below is the simplest example, one of MANY, and connection methods I have tried that utterly fails, just like all the rest. The SP works in MariaDb when Executed, but

Read More
PHP

How to create a custom REST API endpoint for publishing posts with specific permalinks in WordPress?

I’m a new with php and I am working on a WordPress project where I need to create a custom REST API endpoint that allows publishing posts with specific permalinks. Here’s what I’m trying to achieve: Create a new REST API endpoint, something like /wp-json/custom/post This endpoint should accept POST requests with the following parameters:

Read More