Category "php"

PHP 8.1: strftime() is deprecated

When upgrading to PHP 8.1, I got an error regarding "strftime". How do I correct the code to correctly display the full month name in any language? $date = str

WooCommerce Product Addons - append image to product addon field

I actually struggling with WooCommerce Product Addons plugin. The result which I want is to give possibility that woocommerce product addon fields (checkboxes t

Having problems with sessions not allowing flow from isset to isset in same page

I have a page titled "test.php" When I remove all session statements it works fine. However I wish to create session for security purposes (cannot get in witho

how to retrieve the first and last instance of a row in pdo dataset

I have a dataset that I retrieve using PDO and fetchall. I need to find the first date a part was sold and its cost then also I need to find the last date that

Why does using salted hash on python and php give me different results?

I ran into a problem in translating code from PHP to Python. Initially, there is a PHP code that creates a salted hash of a password with verification, and this

Open source html and css

Is HTML or CSS open source like PHP or Python? For example PHP itself: PHP source link in GITHUB

Excel / PHPSpreadSheet : LOAD and SAVE WITH Charts, unexpected argument

I'm trying to load my excel file through PHPSpreadSheet library including the charts. At the reader step, everything is working fine and I could without difficu

Emails created with summernote are formatted differently when sent from Firefox and Chrome

I am trying to use summernote to send emails from a text editor. When the email is sent from Firefox, it is correctly formatted and matches the text entered in

Hi, I am making a contact form thingy, and my php isn't working any reason why?

Error: the code: <?php $name = $_POST['name']; $mail = $_POST['mail']; $message = $_POST['message']; $to ="[email protected]"; $sub

Laravel : How to Create Dropdown to Select FOREIGN KEY from Other Table?

i want to ask you how to select FOREIGN KEY (from "doa_id in "doas" table) when user create a new data (to the "notes table) in a form. This is my code : NoteCo

Unit (real unit test) of test laravel relationship

Background Framework: laravel 9.x PHP 8.0 Continuous integration (Travis CI etc) I am working on a project that is legally very sensitive, so testing is vital.

What might the issue with this my code to upload image in my users form

I created a form to capture user details including their passport, but when ever the user fill the form, it went blank without populating the database with the

Is there a way to use Foundry Model for Authentification inside Functional Tests?

1) App\Tests\Controller\Admin\Api\Promotion\PromotionDeleteControllerTest::test_deleting_promotion LogicException: The first argument of "Symfony\Bundle\Framewo

Importing Data from a Password Protected Website

I've the following macros working independently of each other (sort of). I need them working together. First I import data from a URL that points to a CSV file

Dropdown with current value from Mysql

I am struggling to solve a problem in a CRUD working with MySQL (MariaDB). The situation is the following: I have a DB table called "tools" in this table I have

Losing session data after POST from third party website

I have a Laravel site that redirects to a payment provider (external third party website). When the user completes their payment, they are redirected back to my

Laravel s3 upload file with metadata using pre-signed url

I am implementing S3 file uploads and downloads using pre-signed urls. I have one s3 bucket (versioning enabled) and one AWS user but I want to track the histor

How to convert RGBA color codes to 8 Digit Hex in PHP?

I'm attempting to convert some rgba values into a format suitable for SubStation Alpha subtitle files. The .ass file format requires a colour format like &H

Elastic beanstalk cron with laravel schedule

I have just made two schedule in laravel. Register them in kernel like this $schedule->command('jobs:expire')->everyMinute(); $schedule->command('job

Yii2 redirecting to previous page after login

Hello World! so here is the deal, i am trying to redirect the users after loginin' in to the previous page but it's not working .. i tried to use all of these