Category "php"

Adding basic data to database - Laravel 8 + ajax

My laravel framework version is on 8.83.12 I am trying to build a form that creates a database entry based on Vehicle data, Make, Model, Version.. etc. My Model

Can't use PHPMailer to sign with S/MIME, getting "Signing Error: "

I'm using phpmailer to try to send signed emails (S/MIME). I used this excellent tutorial by John Dalesandro to create a Self-Signed S/MIME Certificate and pack

Woocommerce - hide an element if logged in, show element if logged out

i've found the following code to make an element change to display:block; if a user is logged in .logged-in .price{ display: none; } and also <?php if ( i

Wordpress Form POST Request In Current Page Got Twice

I use wordpress shortcode to create a form and send post request in current page. But I will get twice post request so my mail will send twice. Hope someone can

Fatal error: Uncaught ImagickException: FailedToExecuteCommand `"gs"

I'm trying to convert a pdf file to image using Imagick. I got this error mesage Fatal error: Uncaught ImagickException: FailedToExecuteCommand `"gs" -sstdout=%

Using mysql in github workflow always leads to SQLSTATE[HY000] [1045] Access denied for user error

Im currently configuring a CI pipe for my laravel project via github actions. This is my build.yml file # GitHub Action for Laravel with MySQL and Redis name: A

PHP installation source

often we get a pack and made configure as habitual. I'm trying to set a dev enviorment with Apache (already installed), SQL and PHP. Curiosly, the PHP introdue

ajax load method and a while loop appears to only return 1 row

So i am calling a load method in ajax on my table. <?php include_once "inc/Header.php"; ?> <body> <head> <link rel="styl

How to group subarrays by a column value?

I have the following array Array ( [0] => Array ( [id] => 96 [shipping_no] => 212755-1 [part_no] =>

Replacement for "wddx_serialize_value" function in PHP 7.4+

I am using wddx_serialize_value function in my application, now I upgraded to PHP 7.4, But this function is removed from PHP 7.4, So what is the alternative for

How to get every words before () in a string

How can i get every words before the word inside a () $str = "There are some (Cat) which are wild"; $str = "Animal (Cat) is a domestic pet"; echo implode(" ", a

is there a way to put placeholders in excel files using phpspreadsheet?

is there any way to get placeholders in my excel file using phpspreadsheet? all I see I can do is using a specific cell to put my data into it eg. setCellValue(

How remove part of url from browser with htacess

I have 2 domains in the same hosting, inside the folder public_html stay the folders and the index.php from the domain principal and inside the public_html have

How to extract value from nested cURL

I'm trying to extract the data from (php)cURL response that I received from the external api. I received the response like below. {"result":"OK","data":{"body":

When using the substr() string function, Why is a litteral carriage return twice as long as a line feed character "\n"?

When typing the following code ... (easily testable with W3schools' editor) <?php $basecss = '.class { margin-bottom:0 } /*1234567890'; $basemincss = ".

PHP autoloader cant find necessary class

So I am learning PHP MVC for the first time, and i came up to a term - autoloading all the required .php files. So I searched the web for some examples, and mad

I am using PHP Chrome HTML 2 PDF but unable to use Header and Footer in the PDF

Please find the below code: <?php use Spiritix\Html2Pdf\Converter; use Spiritix\Html2Pdf\Input\StringInput; use Spiritix\Html2Pdf\Output\DownloadOutput; requ

http to https and www to non-www not working correct with laravel 8 URI links

I searched a lot of about this topic to redirect all urls to https://my-domain I want delete the www and add https. I found a lot of answers this one work good

No alive nodes. All the 1 nodes seem to be down

I am trying to use Elasticsearch 8.1 using laravel. My elasticsearch instance is running at port 9200. https://localhost:9200 returns me { "name" : "node-1",

phpmyadmin not opening due to change in config file

I was trying to upload a large .sql file which have more than 14000 rows. which caused the error maximum execution time when importing .SQL data file . Then I s