Category "php"

How to simulate api calls in C# using php file

I have an online reports viewer application that stores patients records as follows: Web application view: I have created a C# application that is meant to cap

Insert into multiple input fields using select2 and ajax in laravel

I am trying to use a single select request to retrieve data from database based on the search term "name" and populate my input fields using select2 so that i d

Laravel "Skip" WhereIn when request not Filled or null?

I have controller with request like below $product = $request->product; //array $product_category = $request->product; if($request->filled('product'))

How to write rendered content between<pre><code> to a file

I have a file main.php with code snippet as <pre><code> echo htmlspecialchars ('echo "this is a $name of your best friend";'); </pre></c

What is faster in PHP: dechex() or sprintf("%x")?

What is the fastest way to convert a number to the hexadecimal representation in PHP: dechex($number) or sprintf("%x",$number)?

Laravel Excel beforeExport event to load excel from aws s3 bucket not working

I am using matwebsite Laravel excel to do some updates in existing excel and export. I am using beforeExport method to do some updates in the excel. when i prov

Sort ServerSide DataTable on calculated / formatted value that is not a column in the DB

I've been using Laravel Datatables for awhile in some of the Laravel applications and I really love that, and probably using a fraction of the features. I also

The matching algorithm for hashing passwords

So my question is : How does hashing algorithms actually check if passwords match because they generate a new password every time. Let's suppose I have a passwo

image uploads but won't display php

I successfully can upload the image into MySQL but when trying to display the image from the MySQL they appear broken. $image = $_FILES['image']['tmp_name'];

Image Not visible In TCPDF

here I have a Data i need it in Pdf But image not showing Below are my code i already stored data in a variable $signature= $_POST['signature']; $tbl = '<

WooCommerce - Get Price Total as number

I'm a newbie, and I have this problem as it shows me $0.00 on the Order received page. // Add Custom WooCommerce Checkout Message add_action( 'woocommerce_thank

How to pass calculated/final value of one function to other functions in a controller of Codeigniter application

Using sessions we can achieve this, but need this without sessions or cookies. <?php class Employees extends CI_Controller { public f

PHPSocket.io emit message from PHP to PHP

I'm trying to emit message from PHP code to websocket server built with PHPSocket.io Emitter code: <?php require_once __DIR__ . '/vendor/autoload.php'; $emit

Dropdown menu remain open after click and refresh

I have a problem on how to make my dropdown remain open after clicking and avoid closing after refresh. Here's what I've done. <button class="dropdown_btn"&g

Apache + PHP-FRM, php_value statements in a pool

I run several small websites using named virtual hosts, with Apache/mod_php. After moving to a new machine last week, I discovered that Apache/PHP-FPM had been

group/sum multiple related arrays

4 arrays given. I want to group the arrays by it's value if they have the same value on different positions and sum the integer value if grouped. $arr1 = ["101"

What are the differences in die() and exit() in PHP?

What are the differences between die() and exit() functions in PHP? I think both have the same functionality, but I doubt there is something different in both.

Why can I upload files to Wasabi using S3 and Laravel, but trying to get returns file not found?

So I am using Wasabi for object storage in my Laravel API, but after I got the upload working, now I can't get the download to work. I am using this package: ht

wkhtmltopdf conversion: HTML table does not fit within the A4

I created a basic PHP webpage to generate a timesheet of the monthly working hours of employees of a company. The work hours and the other details in the table

Doctrine - Undefined clas const JSON_ARRAY

I got this message error: On stack trace I cant find the file that produces it. I'm using symfony 5 and doctrine. Undefinied class constant 'JSON_ARRAY' I sear