admin

admin

How to Subscribe to List using MailChimp API using PHP

MailChimp is an email marketing service, helps to manage the subscribers of your website. MailChimp provides an easy way to integrate email signup form in your website and send the email newsletter to the subscriber. Code $apiKey = ‘InsertMailChimpAPIKey’; $listID…

How to Create PDF file using fpdf in PHP

I have used a library fpdf open source and very useful library for developers here is a simple tutorial on how to convert How to Convert HTML to PDF with fpdf. Download fpdf library With fpdf library we used HTMLparser…

Paypal Payment using PHP

In this tutorial I want to explain how to work with Paypal Sandbox test accounts for payment system development and sending arguments while click buy now button. It’s simple and very easy to integrate in your web projects. Create a…

How to Automatic Copyright Year using PHP

Use the date() function to automatically update the copyright year on your website. Every Website work date function and easily change year automatic. Code &copy; 2015-<?php echo date(“Y”);?>

How to PHP Validate Name

The code below shows a simple way to check if the name field only contains letters and whitespace. If the value of the name field is not valid, then store an error message. Code $name = test_input($_POST[“name”]); if (!preg_match(“/^[a-zA-Z ]*$/”,$name))…

How to PHP Validate Email

Here’s the absolute easiest way you can validate an email address using PHP. This tiny function takes advantage of the filter_var() function in PHP. Code $email = test_input($_POST[“email”]); if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $message = “Invalid email format”; }

PHP POST Method

The POST method transfers information via HTTP headers. The information is encoded as described in case of GET method and put into a header called QUERY_STRING. Code <?php if( $_POST[“username”] || $_POST[“email”] ) { echo “Username”. $_POST[‘username’]. “<br />”; echo…

PHP GET Method

php

The GET method sends the encoded user information appended to the page request. The page and the encoded information are separated by the ? character. URL http://www.example.com/user.php?id=value1&username=value2 Code <?php if( $_GET[“username”] || $_GET[“email”] ) { echo “Username”. $_GET[‘username’]. “<br />”;…