How to Restore MySQL Database from SQL File using PHP


Generally, the import section of phpMyAdmin is used to import or restore the database from a SQL file. You can restore the database from PHP script without login to your hosting server or phpMyAdmin. Restore database from PHP script is very useful when you want to allow the user to restore the database from SQL file in your web application.

Read Full →

Upload and Store Image File in Database using PHP and MySQL


Server-side file upload can be easily implemented using PHP. There are various ways available to upload image to server and display images on the webpage. Generally, in a dynamic web application, the uploaded image is stored in a directory of the server and the file name is inserted in the database. Later, the images are retrieved from the server based on the file name stored in the database and display in the web page.

Read Full →

How to Upload Image in TinyMCE Editor using PHP


Image upload is a common feature in the WYSIWYG HTML editor. If you're using TinyMCE editor in the textarea, the image can be easily inserted in the editor. Server-side upload always a better option to insert the image in a TinyMCE editor. TinyMCE editor supports local file picking and image uploading. But, to make these features functional you required to configure the server-side upload handler.

Read Full →

Convert Array to XML and XML to Array in PHP


XML is used in many ways in the web application. If you're concerned about database size and want to reduce database uses, XML can help you to free the space from the database. Instead of the database you can store the data in the XML file and retrieve data from XML file without connecting to the database. This tutorial shows how to convert PHP associative or multidimensional array to XML and stored in the XML file.

Read Full →

Stripe Payment Gateway Integration in PHP


Stripe payment gateway makes it easy to integrate checkout system and collect payment on the website. The Stripe API is a powerful solution to integrate checkout system in the web application to provide a smooth payment experience. If you want to accept credit card payment on your website, Stripe will the best option for that. You can easily integrate checkout system in your PHP-based website.

Read Full →

How to Get Latitude and Longitude from Image in PHP


Geographical location can be tagged with the photograph by geotagging. Generally, the latitude and longitude are assigned to the image to geotagged photograph. Geotagging is done by two ways, automatic or manual. There is an easy way to get Geotag data from the image using PHP. You can get the latitude and longitude where the picture was taken using PHP and mark the geolocation on Google map.

Read Full →

Pagination in PHP with MySQL


Pagination is a common functionality used almost every web application. When the huge data need to be retrieved from the database, it's not a good idea to display all result on one page. In that case, we can divide the records into pages instead of showing all at once. PHP Pagination class allows to paging data into pages and generates links to get data from MySQL database.

Read Full →

PHP CRUD Operations with MySQLi Extension


CRUD stands for Create, Read, Update and Delete. CRUD operations are commonly used to manipulate data in the database. Almost, all web application used Add, Edit, Update and Delete functionality for managing data. This tutorial will show how you can create a simple PHP CRUD application with MySQL to perform create (insert), read (select), update, and delete operations using MySQLi Extension and OOP.

Read Full →

Send Email with Attachment in PHP


Sending email from the script is the very useful functionality in the web application. If your web application uses PHP, it's very easy to send email from the script using PHP. PHP provides an easy way to send email from the website. Using mail() function in PHP, you can send text or HTML email. But sometimes email functionality needs to be extended for sending an attachment with the email from PHP script.

Read Full →