The purpose of this blogging site to provide coding tutorials, notes,coding tips, MCQs and code examples. You will find tutorials on various IT technologies. This site main goal is helping beginners to become developers. These programming tutorials teach you how to program, and improve coding skills. You will find tutorials on various programming languages. It may help you to shape up your coding ability. Find simple and straight forward coding techniques. Keep visiting..
Uploading Multiple Files in PHP
Get link
Facebook
X
Pinterest
Email
Other Apps
How to Upload multiple files and store in a folder and array
Sometimes we need to upload more than one file at a time. This tutorial helps you how to upload many files and store them in a folder and get their names stored in the PHP array. In this example, there are two files. Create a folder in the server and copy the files given below. Open index.php and check the result.
index.php
upload.php
index.php : Contains front-end code(form for uploading files) and allows user to upload more than one file at a time. User selects multiple files, and clicks on submit button.
upload.php: will receives the files and stores them in a folder and also in an array. Next, using for loop, it prints the names of the uploaded files and the preview of the images.
Open PDF in Bootstrap Modal Window This tutorial shows How to pass a JavaScript/jQuery variable to bootstrap modal view and sets it to iframe src attribute. It passes value dynamically to src attribute of the iframe. When the user clicks a link, it opens the URL in a popup window. This code shows the PDF in a Model without download option by hiding the toolbar. To show PDF toolbar in modal, just add #toolbar=1 in the above script. index.php <!DOCTYPE html> <html lang= "en" > <head> <title>Bootstrap Model with PDF Example - coding-zon</title> <meta charset= "utf-8" > <meta name= "viewport" content= "width=device-width, initial-scale=1" > <link rel= "stylesheet" href= "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" > <script src= "https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.slim....
Shopping cart using PHP Sessions, MySQL In this tutorial, you are going to learn how to build a simple shopping cart project using PHP and MySQL. It is a basic project aimed for beginners . This project uses PHP Session to implement shopping cart. Within the session, a cart is created. Sessions allows you managing the products in the cart. Such as… adding product to the cart, modifying the product quantity, deleting the product finding the total number of products in the cart. etc. Download source code from the given link: Note: Scan the code with antivirus and use it. Download Here are steps to accomplish the project. Just follow them. STEP-1 Create a project in a server. Create an image's folder inside the project folder. As given in the picture. Copy some sample products images in that. GO TOP↑ STEP-2: Start server. Open PhpMyAdmin tool in a browser, Create a database, with name shoppingcartdb. Create Table. And insert Data using the given queri...
How to Export Data to Excel using PHP and MySQL This tutorial demonstrates you how to export MySQL table data to Excel spreadsheet, when a user clicks a button on a webpage. You can achieve this using PHP, MySQL. For this, create the files specified in the below, in some folder in Apache server. php2excel-tbl .php export.php Now run the first file in the web server. When button clicked, export.php will be executed at backend and generates the Excel file. php2excel-tbl.php <?php /*******EDIT DB Details *******/ $DB_Server = "localhost" ; //MySQL Server $DB_Username = "root" ; //MySQL Username $DB_Password = "" ; //MySQL Password $DB_DBName = "usersdb" ; //MySQL Database Name $DB_TBLName = "users" ; //MySQL Table Name $filename = "excel-users-list" ; //File Name /*******YOU DO NOT NEED TO EDIT ANYTHING BELOW THIS LINE*******/ //create MySQL connection...
Comments
Post a Comment