PHP Tutorials

Send email with attachment using phpmailer

Send email with attachment using phpmailer




In this tutorial I am going to show you how to send email with attachment using phpmailer. I have already write a tutorial on How to Send Email in PHP it included attachment also. Now in this tutorial, I will write send email with attachment using phpmailer. Simple Code: This is the simple code to send email to any one with attachment. If you want more option in attachment like …

Continue reading




Prevent multiple POSTs when refresh in PHP




In this tutorial I will show you how to prevent multiple POSTs when refresh the page in PHP. For example a user is on contact us page and he fill the information and submit the form and than he refreshed the page for some reason. So this way duplicate entries can be inserted into database. Simple Form Page Example <?php // Database configs $host=”localhost”; $dbuser=”root”; $dbpass=””; $dbname = “simpledb”; // …

Continue reading




Zend Framework 2 Installation via Composer




In this tutorial I will explain the steps for Zend Framework 2 Installation via Composer. Steps for install Zend Framework 2 Installation via Composer First set environment variable D:\xampp\php in Advanced system settings. Download and install composer from https://getcomposer.org/Composer-Setup.exe once you installed automatically composer variable will be added into environment variables (C:\ProgramData\ComposerSetup\bin;) Now download and install git from http://msysgit.github.io/ Like below screenshot, select 2nd option when you install. Once you …

Continue reading




Difference between single and double quotes in PHP




Today in this tutorial I will show you the difference between single and double quotes in PHP. Strings within double quotes: 1. You can put variables directly within the text. The PHP parser will automatically detect such variables, convert their values into readable text and replace variables. Above example will render on screen: The variables were automatically detected and concatenated with the text. 2. You can not write double quotes …

Continue reading




Best PHP Forums




Forum is a place where you can start share and discussion with many other users on any topic. Any forum member can reply to your messages any time and you can see them anytime. There are many free open source forums available. PHP is popular open source in web technology. So in this tutorial we will discuss best PHP forums. Best PHP Forums   phpBB If you are looking for …

Continue reading




Timezone Conversion in PHP

timezone conversion




Today in this tutorial I will let you know how to convert date and time from one timezone to another timezone in PHP. Following is a simple method with simple example of timezone conversion in PHP. You can use the DateTime object and their function aliases like as below: Result is as follow: DateTime is exists on PHP 5.2 and above. Hope this tutorial will help you.




Send emails from local using XAMPP with SMTP

Send emails from local using XAMPP with SMTP




In this tutorial I will explain how you can send emails from local using XAMPP with SMTP settings. It will help you to check the display of the email body on your local system. Open D:\xampp\sendmail\sendmail.ini file and change the below values : Now open D:\xampp\php\php.ini file and change below: Now you don’t need to use any SMTP details in your application. Just use php mail() function like below. Hope …

Continue reading




Take a Screenshot Using Html2Canvas JS

Take a Screenshot Using Html2Canvas JS




In previous post I have explained about Feedback with screenshot using feedback JS, which is using Html2Canvas JS to take a screenshot, now In this tutorial I will show how you can take a screenshot using Html2Canvas JS. This script allows you take a screenshot of a part of the web page also. You can download Html2Canvas jQuery plugin from https://github.com/niklasvh/html2canvas/releases. Following is an example to take a screenshot of full …

Continue reading