Category "php"

How to use ajax-load-more Wordpress plugin for search.php?

i am using Ajax-Load-More wordpress plugin for my web site but i don't understand how to use for search result in search.php there is no code example for searc

Form Validation and Submission to database

I am working on a project that has a FORM which should VALIDATE itself and then submit the data to the MySQL Database. But I am facing an error. This is the f

Custom hidden field on WooCommerce checkout not saving to user meta issue

I cannot figure out what i am missing here. I am creating a hidden field on the checkout page, that contains a value after a customer's choice. This part is wor

Eloquent insert id with sequence next value

I would like to create a new record in a PostgreSQL database table with Laravel eloquent but the table id is not auto incremented and it's make my life more dif

How to upload mpdf file after generating to s3 bucket in php

Can I upload mpdf file to s3 server after generating. $file_name = $pdf->Output(time().'_'.'E-Prescription.pdf','F');

php - add comma thousands separator but remove trailing zeros

I am trying to use PHP to format a number to Remove all trailing zeros Add a comma for the thousands separator List two decimal points, assuming that they are

Rocket League API Not giving data

I've been trying to use the Rocket League API from the trackerhttps://api.tracker.gg/api/v2/rocket-league/standard/profile/(platform)/(name) When i use the link

CONCAT columns with Laravel 5 eloquent

Consider me as laravel beginner The goal is: I have two colums, now I need the id to be prefixed with the component name of same row in the table. For Exampl

PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_mysqli.dll' and php_mysql.dll

When I check the PHP version using php -v i got error message like below PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_m

In PHP, which is faster: preg_split or explode?

Which is faster when using it to extract keywords in a search query in php: $keyword = preg_split('/[\s]+/', $_GET['search']); or $keyword = explode(' ', $_GET

Respond with status code 401 on authentication failure using Laravel and Passport?

I'm configuring a Laravel project to use Passport token authentication. Everything seems to be working, but when the auth:api middleware fails, it responds to t

How do I enable error reporting in Laravel?

I'm using Laravel 5.2 and I'm trying to import an excel sheet which contains more than 18000 records. the error below appeared. The localhost page isn’t w

Store multiple fields in JSON column (Nova CMS)

I have a posts table that has a json column "read_more_section". And I want to store on that column the information regarding some fields on the NOVA CMS (title

Display the default discounted price and percentage on Woocommerce products

I am trying to display the percentage discount of a product on Woocommerce. The solution originally provided (linked below) works, however the discount percenta

Convert php and mysql web application into offline desktop application

I have made a web application with php and mysql in wamp server. Now i want to convert it into desktop application for windows platform which will run offline a

passing parameters in form using laravel8 route

<form action="{{route('products.update',$products->id)}}" method="post"> this code make this error: Property [id] does not exist on this collection in

Edit product hook WooCommerce

On my product template, I execute this action : <?php /** * woocommerce_single_product_summary hook. * * @hooked woocommerce_template_single

I want to display a sweetalert after the inserting of data in my database

This is my php code of inserting data in mysql and displaying sweetalert after insertion but the sweetalert is not displayed. <?php if(isset($_POS

PHP password_verify

I am working on making a login section for my project website using PHP, but for some reason, verify_password won't return true, even when I am giving the corre

How can i hide dt if dd got empty value

I need to hide dt if dd got empty value. how can i do that? <dt class="col-sm-6 text-dark" >Subject</dt> <dd class="col-sm-6">{{$course_