Save Files to MySQL using PHP

We have seen file upload using PHP in previous tutorials PHP file upload but in this tutorial we will see how to save files to MySQL database using PHP.

You may be wonder why you would need to save file content into database rather than just into the file system. In situations where PHP application needs to put entire file then the preferred method would be to put the file into server’s file system and save the file path into the database.

However in situations, where an application needs to save the entire file content into database along with other data. In such cases you have to put the file content into MySQL’s BLOB data type field.

Continue reading “Save Files to MySQL using PHP”

PHP Multiple Files Upload Example

This tutorial will show you how to upload multiple files using PHP. In this example the files are selected using the browse buttons and files are uploaded to the ‘uploads’ directory under root project directory. PHP script stores the files into the defined location and returns response as a success or failure message from the PHP script. As a validation step I have added only to check if you have selected at least one file for uploading or not.

You may want to read also PHP Single File Upload Example

This tutorial will give you more attachment link for uploading file, so you will click on Attach another file then you will get Choose File button to attach another file. If you do not want to upload the chosen file then you can delete the attached file using Delete link.

Continue reading “PHP Multiple Files Upload Example”

PHP File Upload Example

This tutorial will show you how to upload a file using PHP. In this example the file is selected using the browse button and file is uploaded to the ‘uploads’ directory. PHP script stores the file into the defined location and returns response as a success or failure message from the PHP script. As a validation step I have added only to check if you have selected a file for uploading or not.

Continue reading “PHP File Upload Example”

AJAX File Upload using Codeigniter, jQuery

I will show you how to upload a file using Codeigniter, AJAX and jQuery without page refresh. This file upload tutorial example is very helpful to implement the upload functionality. In this example the file is selected using the browse button and file is uploaded to the ‘uploads’ directory. Codeigniter controller stores the file into the defined location and returns response as a success or failure message from the controller. As a validation step I have added only to check if you have selected a file for uploading or not.

You may read also AJAX Multiple Files Upload using PHP, jQuery and  AJAX File Upload using PHP, jQuery

Continue reading “AJAX File Upload using Codeigniter, jQuery”

AJAX File Upload using PHP, jQuery

I will show you how to upload a file using PHP, AJAX and jQuery without page refresh. This file upload tutorial example is very helpful to implement the upload functionality. In this example the file is selected using the browse button and file is uploaded to the ‘uploads’ directory. PHP script stores the file into the defined location and returns response as a success or failure message from the PHP script. As a validation step I have added only to check if you have selected a file for uploading or not.

You may read also  AJAX Multiple Files Upload using PHP, jQuery and AJAX File Upload using Codeigniter, jQuery

Continue reading “AJAX File Upload using PHP, jQuery”

Upload and Play Video using Codeigniter

This tutorial will show you how to upload a video and display or play the video using Codeigniter. CodeIgniter’s File Uploading Class permits files to be uploaded. You can set various preferences, restricting the type and size of the files.

Uploading a file involves the following general process:

An upload form is displayed, allowing a user to select a file and upload it.
When the form is submitted, the file is uploaded to the destination you specify.
Along the way, the file is validated to make sure it is allowed to be uploaded based on the preferences you set.
Once uploaded, the user will be shown a success message.

Prerequisites

Netbeans 8.1
XAMPP in Windows
Codeigniter 3.0.6 Continue reading “Upload and Play Video using Codeigniter”

Upload and Watermark(Overlay) Image using Codeigniter

This tutorial will show you how to upload an image and watermark the image using Codeigniter. The Watermarking feature requires the GD/GD2 library.
CodeIgniter’s File Uploading Class permits files to be uploaded. You can set various preferences, restricting the type and size of the files.

Uploading a file involves the following general process:

An upload form is displayed, allowing a user to select a file and upload it.
When the form is submitted, the file is uploaded to the destination you specify.
Along the way, the file is validated to make sure it is allowed to be uploaded based on the preferences you set.
Once uploaded, the user will be shown a success message.

CodeIgniter’s Image Manipulation class lets you perform the following actions:

Image Resizing
Thumbnail Creation
Image Cropping
Image Rotating
Image Watermarking

Continue reading “Upload and Watermark(Overlay) Image using Codeigniter”

Upload and Watermark(Text) Image using Codeigniter

This tutorial will show you how to upload an image and watermark the image using Codeigniter. The Watermarking feature requires the GD/GD2 library.
CodeIgniter’s File Uploading Class permits files to be uploaded. You can set various preferences, restricting the type and size of the files.

Uploading a file involves the following general process:

An upload form is displayed, allowing a user to select a file and upload it.
When the form is submitted, the file is uploaded to the destination you specify.
Along the way, the file is validated to make sure it is allowed to be uploaded based on the preferences you set.
Once uploaded, the user will be shown a success message.

CodeIgniter’s Image Manipulation class lets you perform the following actions:

Image Resizing
Thumbnail Creation
Image Cropping
Image Rotating
Image Watermarking

Continue reading “Upload and Watermark(Text) Image using Codeigniter”

Upload and Rotate Image using Codeigniter

This tutorial will show you how to upload an image and rotate the image using Codeigniter. CodeIgniter’s File Uploading Class permits files to be uploaded. You can set various preferences, restricting the type and size of the files.

Uploading a file involves the following general process:

An upload form is displayed, allowing a user to select a file and upload it.
When the form is submitted, the file is uploaded to the destination you specify.
Along the way, the file is validated to make sure it is allowed to be uploaded based on the preferences you set.
Once uploaded, the user will be shown a success message.

CodeIgniter’s Image Manipulation class lets you perform the following actions:

Image Resizing
Thumbnail Creation
Image Cropping
Image Rotating
Image Watermarking Continue reading “Upload and Rotate Image using Codeigniter”

Upload and Crop Image using Codeigniter

This tutorial will show you how to upload an image and crop the image using Codeigniter. CodeIgniter’s File Uploading Class permits files to be uploaded. You can set various preferences, restricting the type and size of the files.

Uploading a file involves the following general process:

An upload form is displayed, allowing a user to select a file and upload it.
When the form is submitted, the file is uploaded to the destination you specify.
Along the way, the file is validated to make sure it is allowed to be uploaded based on the preferences you set.
Once uploaded, the user will be shown a success message.

CodeIgniter’s Image Manipulation class lets you perform the following actions:

Image Resizing
Thumbnail Creation
Image Cropping
Image Rotating
Image Watermarking Continue reading “Upload and Crop Image using Codeigniter”