Category: PHP

Php upload multiple files example

Today we discuss about the php upload multiple files example. Below are the steps to upload multiple files and store them in a folder − HTML code <form method=”post” id=”” action=”action.php” enctype=”multipart/form-data”> <div class=”row” style=”padding-top: 10px;”> <div class=”col-md-6″> <div class=”form-group”> <label>PDF/Image</label> <input type=”file” class=”form-control” name=”patient_report[]” multiple=”multiple”> </div> </div> </div> <div class=”row” style=”padding-top: 10px;”> <div class=”col-md-6″> […]

Integrate MailChimp API with PHP

Today, We will tell you how to integrate MailChimp API with PHP.Subscribers add to Mailchimp using their API using PHP cURL.Mailchimp is a popular email marketing tool(service) that manages subscribers.Using Mailchimp, you can send an email like announcements or offers. Requirement API key from the Mailchimp List id from the Mailchimp Customer data sent to […]

Create a pie chart using JavaScript.

Today, We learn to create a pie chart without any library. This post will take you through how to do that using JavaScript, HTML Canvas, and CSS. Pre-Requirements HTML CSS JavaScript Create a pie chart full code: <!DOCTYPE html> <html> <head> <title>canvas test</title> <style type=”text/css”> .pie_container{ width: 100%; height: 100vh; display: flex; justify-content: center; align-items: […]

Access denied for user ‘phpmyadmin’@’localhost’ (using password: YES)

In this blog, we will see how to fix the error “Access denied for user ‘phpmyadmin’@’localhost’ (using password: YES)” following simple steps. Once you follow the below you will be able again to use your phpMyAdmin@localhost database. Below are the steps:- You have to open XAMPP Control Panel ->Click MySql Config->Click my.ini. It will open […]

How to find nearest value in PHP

Today we discuss about the nearest Value in PHP. Suppose that I have nmber like 456 its will become 460. You can get right value using below method. Nearest the value in PHP echo roundToTheNearestAnything(121, 10).'<br>’; echo roundToTheNearestAnything(8, 5).'<br>’; echo roundToTheNearestAnything(1, 2).'<br>’; function roundToTheNearestAnything($value, $roundTo) { $mod = $value%$roundTo; return $value+($mod<($roundTo/2)?-$mod:$roundTo-$mod); } Nearest the value […]

Encrypt decrypt in php with salt

OpenSSL functions to use encrypt decrypt in php with salt below code Encrypt Method $privateKey = ‘AA74CDCC2BBRT935136HH7B63C27’; // user define key $secretKey = ‘5fgf5HJ5g27’; // user define secret key $encryptMethod = “AES-256-CBC”; $string = ‘IB12345’; // user define value $key = hash(‘sha256’, $privateKey); $ivalue = substr(hash(‘sha256’, $secretKey), 0, 16); // sha256 is hash_hmac_algo $result = […]

Database connection in PHP

Ways of Connecting to MySQL through PHP Today we will see how to program databases connection in PHP. In order to store or access the data inside a MySQL database, you first need to connect to the MySQL database server and a PHP script. When developers usually say database, they are referring to MySQL. MySQL’s […]

Back To Top