How to Use PayPal Credit Card Payment in PHP

How to Use PayPal Credit Card Payment in PHP

In this post, we are going to explain how we can use PayPal credit card payment in PHP for Direct payment.

PayPal, Credit Card Payment API (means PayPal PHP merchant SDK) deals to process a credit card payment or DoDirect Payment on your website.

PayPal Credit Card Payment works in a few steps in the merchant’s website rather than going to the actual PayPal page and then logging in and returning back to the same.

The key thing is, using PayPal Credit Card, the payment process is done on your web page only. As the name also depicts it is a direct payment.

In this blog post, we are going to explain how we can use PayPal credit card payment in PHP for Direct payment.

Watch the live demo or download code from the link given below

Project Integration

For configuration of PayPal PHP merchant SDK, add your account credentials in the configuration.php.

You can find this file in downloaded project “root folder”.

// Demo Signature Credential
"acct1.UserName" => "Demo-facilitator_api1.outlook.com",
"acct1.Password" => "PDRdd9FTWWU6FDBNKY",
"acct1.Signature" => "ANGx9dddfhOMduIxwcbkuUqPMh-9L15RAO6JJD8BDCZSxcx8nbBWeDOIbzW1",

Then you will be ready to run the project. You can also refer the install.txt file given in the download code folder.

Note: In demo we have used Sandbox and demo VISA card for testing, for making it live you have to edit configuration.php config array mode, sandbox to live as shown below.

 $config = array(
// values: 'sandbox' for testing
// 'live' for production
"mode" => "sandbox",
'log.LogEnabled' => true,
'log.FileName' => '../PayPal.log',
'log.LogLevel' => 'FINE'
);

Tutorial Scripts in detail

Below are the details of the code used in this tutorial with proper explanation.

Index.php

In index.php contain code for showing product details. Here we demonstrate simple Bag seller site. When buyers click on the Buy now button it posts product information data to getcreditcard.php page.

<html>
<head>
<title>paypal payments via credit card</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>

<div id="main">
<center><h1>PayPal Payments via Credit Card</h1></center>
<div id="main_wrapper">
<div id="container">
<h2>BEST SELLER</h2>
<hr/>
<form action="getcreditcard.php" method="POST">
<div id="product">
<img src="images/bag2.jpg"/>
<p>Tas Ransel Orange bag</p>
<h3>$21.10</h3>
<input type="hidden" value="<?php echo base64_encode(1); ?>" name="id">
<!-- <a href="#" id="buynow"> Buy Now </a> -->
<center><input type="submit" id="buynow" value="Buy Now"></center>
</div>
</form>
<form action="getcreditcard.php" method="POST">
<div id="product">
<img src="images/bag.jpg"/>
<p>Tas Ransel Jeans bag</p>
<h3>$15.20</h3>
<input type="hidden" value="<?php echo base64_encode(2); ?>" name="id">
<!-- <a href="#" id="buynow"> Buy Now </a> -->
<center><input type="submit" id="buynow" value="Buy Now"></center>
</div>
</form>
<form action="getcreditcard.php" method="POST">
<div id="product">
<img src="images/bag4.jpg"/>
<p>Tas Ransel grey bag</p>
<h3>$11.10</h3>
<input type="hidden" value="<?php echo base64_encode(3); ?>" name="id">
<!-- <a href="#" id="buynow"> Buy Now </a> -->
<center><input type="submit" id="buynow" value="Buy Now"></center>
</div>
</form>
</div>
</div>
<img id="paypal_logo" style="float:right; margin: -30px -42px 0 0;" src="images/secure-paypal-logo.jpg">
</div>
</body>
</html>

Getcreditcard.php

Getcreditcard.php page get credit card details and billing address and post all information to DoDirectPayment.php.

<?php
//Decode product id
//If you want to use Database fetch product data by id here
if (base64_decode($_POST['id']) == 1) {
$p_price = 21.10;
$p_currency = 'USD';
$p_name = 'Tas Ransel Orange bag';
} else if (base64_decode($_POST['id']) == 2) {
$p_price = 15.20;
$p_currency = 'USD';
$p_name = 'Tas Ransel Jeans bag';
} else if (base64_decode($_POST['id']) == 3) {
$p_price = 11.10;
$p_currency = 'USD';
$p_name = 'Tas Ransel grey bag';
}
?>
<html>
<head>
<title>paypal payments via credit card</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/loadding.css">
<link rel="stylesheet" type="text/css" href="css/popup-style.css">
</head>
<body>

<div id="main">
<center><h1>PayPal Payments via Credit Card</h1></center>
<form action="DoDirectPayment.php" method="POST">
<div id="container">
<h2>Pay with my debit or credit card</h2>
<hr/>
<center> <h3>Billing Information</h3></center>
<input type="hidden" name="paymentType" value="Sale"/>
<input type="hidden" name="id" value="<?php echo $_POST['id']; ?>"/>
<table style="width:100%">
<tr>
<td id="td-label">First name : </td>
<td><input type="text" name="firstName" id="name" placeholder="enter first name"></td>

</tr>
<tr>
<td id="td-label">Last name : </td>
<td><input type="text" name="lastName" id="name" placeholder="enter last name"></td>

</tr>
<tr>
<td id="td-label">Card type : </td>
<td>
<select name="creditCardType">
<option value="Visa" selected="selected">Visa</option>
<option value="MasterCard">MasterCard</option>
<option value="Discover">Discover</option>
<option value="Amex">American Express</option>
</select>
</td>

</tr>
<tr>

<td id="td-label">Card number : </td>
<td><input type="text" name="creditCardNumber" id="cardno" placeholder="enter card number" required="true"></td>

</tr>

<tr>

<td id="td-label">Expiry date : </td>
<td><div id="date-div"><select name="expDateMonth">
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select></div>
<div id="year-div">
<select name="expDateYear">
<option value="2015">2015</option>
<option value="2016">2016</option>
<option value="2017">2017</option>
<option value="2018">2018</option>
<option value="2019">2019</option>
<option value="2020">2020</option>
</select>
</div></td>
</tr>
<tr>
<td id="td-label">CVV : </td>
<td><div id="date-div"><input type="text" name="cvv2Number" id="cvv" placeholder="cvv" required="true"></div></td>
</tr>
<tr>
<td id="td-label">Amount( USD ) : </td>
<td><input type="text" name="amount" id="name" placeholder="enter amount " value="<?php echo $p_price; ?>" disabled="true"></td>

</tr>
</table>
<center> <h3>Billing address</h3></center>
<table style="width:100%">
<tr>
<td id="td-label">Address 1 : </td>
<td><input type="text" name="address1" id="name" placeholder="enter address "></td>

</tr>
<tr>
<td id="td-label">Address 2 : </td>
<td><input type="text" name="address2" id="name" placeholder="enter address"></td>

</tr>
<tr>
<td id="td-label">City : </td>
<td><input type="text" name="city" id="name" placeholder="enter city name"></td>

</tr>
<tr>
<td id="td-label">State : </td>
<td>
<div id="date-div">
<select id="state" name="state">
<option value=""></option>
<option value="AK">AK</option>
<option value="AL">AL</option>
<option value="AR">AR</option>
<option value="AZ">AZ</option>
<option value="CA" selected="">CA</option>
<option value="CO">CO</option>
<option value="CT">CT</option>
<option value="DC">DC</option>
<option value="DE">DE</option>
<option value="FL">FL</option>
<option value="GA">GA</option>
<option value="HI">HI</option>
<option value="IA">IA</option>
<option value="ID">ID</option>
<option value="IL">IL</option>
<option value="IN">IN</option>
<option value="KS">KS</option>
<option value="KY">KY</option>
<option value="LA">LA</option>
<option value="MA">MA</option>
<option value="MD">MD</option>
<option value="ME">ME</option>
<option value="MI">MI</option>
<option value="MN">MN</option>
<option value="MO">MO</option>
<option value="MS">MS</option>
<option value="MT">MT</option>
<option value="NC">NC</option>
<option value="ND">ND</option>
<option value="NE">NE</option>
<option value="NH">NH</option>
<option value="NJ">NJ</option>
<option value="NM">NM</option>
<option value="NV">NV</option>
<option value="NY">NY</option>
<option value="OH">OH</option>
<option value="OK">OK</option>
<option value="OR">OR</option>
<option value="PA">PA</option>
<option value="RI">RI</option>
<option value="SC">SC</option>
<option value="SD">SD</option>
<option value="TN">TN</option>
<option value="TX">TX</option>
<option value="UT">UT</option>
<option value="VA">VA</option>
<option value="VT">VT</option>
<option value="WA">WA</option>
<option value="WI">WI</option>
<option value="WV">WV</option>
<option value="WY">WY</option>
<option value="AA">AA</option>
<option value="AE">AE</option>
<option value="AP">AP</option>
<option value="AS">AS</option>
<option value="FM">FM</option>
<option value="GU">GU</option>
<option value="MH">MH</option>
<option value="MP">MP</option>
<option value="PR">PR</option>
<option value="PW">PW</option>
<option value="VI">VI</option>
</select>

</div>
</td>

</tr>
<tr>
<td id="td-label">Zip code : </td>
<td>
<input type="text" name="zip" id="name" placeholder="enter zip code (5 or 9 digits)">
</td>
</tr>
<tr>
<td id="td-label">Country : </td>
<td><input type="text" name="country" id="name" placeholder="enter country name"></td>
</tr>
<tr>
<td id="td-label">Phone Number : </td>
<td><input type="text" name="phone" id="name" placeholder="enter Phone number "></td>
</tr>
</table><br>
<center><!--<a href="#" id="paynow"> Pay Now </a>--><input style=" width: 20%;"type="submit" id="buynow" name="DoDirectPaymentBtn" value="Pay Now"></center><br>
</div>
</form>
<img id="paypal_logo" style="float:right; margin: -30px -42px 0 0;" src="images/secure-paypal-logo.jpg">
</div>
<div id="pop2" class="simplePopup">
<div id="loader">
<div id="circularG">
<div id="circularG_1" class="circularG">
</div>
<div id="circularG_2" class="circularG">
</div>
<div id="circularG_3" class="circularG">
</div>
<div id="circularG_4" class="circularG">
</div>
<div id="circularG_5" class="circularG">
</div>
<div id="circularG_6" class="circularG">
</div>
<div id="circularG_7" class="circularG">
</div>
<div id="circularG_8" class="circularG">
</div>
</div>
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.simplePopup.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('input#buynow').click(function() {
if ($('input#cardno').val() != '') {
if ($('input#cvv').val() != '') {
$('#pop2').simplePopup();
}
}

});
});
</script>
</body>
</html>

DoDirectPayment.php

DoDirectPayment.php take all posted data and process to PayPal for payment.

<?php
/* * *********************************************************
DoDirectPayment.php
Submits a credit card transaction to PayPal using a
DoDirectPayment request.
* ********************************************************* */
session_start();
require_once('../PPBootStrap.php');

if (base64_decode($_POST['id']) == 1) {
$p_price = 21.10;
$p_currency = 'USD';
$p_name = 'Tas Ransel Orange bag';
} else if (base64_decode($_POST['id']) == 2) {
$p_price = 15.20;
$p_currency = 'USD';
$p_name = 'Tas Ransel Jeans bag';
} else if (base64_decode($_POST['id']) == 3) {
$p_price = 11.10;
$p_currency = 'USD';
$p_name = 'Tas Ransel grey bag';
}
/**
* Get required parameters from the web form for the request
*/
$firstName = $_POST['firstName'];
$lastName = $_POST['lastName'];

/*
* shipping adress
*/
$address = new AddressType();
$address->Name = "$firstName $lastName";
$address->Street1 = $_POST['address1'];
$address->Street2 = $_POST['address2'];
$address->CityName = $_POST['city'];
$address->StateOrProvince = $_POST['state'];
$address->PostalCode = $_POST['zip'];
$address->Country = $_POST['country'];
$address->Phone = $_POST['phone'];
$orderTotal = new BasicAmountType();
$orderTotal->currencyID = $p_currency;
$orderTotal->value = $p_price;

$paymentDetails = new PaymentDetailsType();
$paymentDetails->ShipToAddress = $address;

$itemDetails = new PaymentDetailsItemType();
$itemDetails->Name = $p_name;

$itemDetails->Amount = $orderTotal;
/*
* Item quantity. This field is required when you pass a value for ItemCategory.
*/
$itemDetails->Quantity = '1';
/*
* Indicates whether an item is digital or physical.
*/
$itemDetails->ItemCategory = 'Physical';

$paymentDetails->PaymentDetailsItem[0] = $itemDetails;
$paymentDetails->OrderTotal = $orderTotal;
if (isset($_REQUEST['notifyURL'])) {
$paymentDetails->NotifyURL = $_REQUEST['notifyURL'];
}

$personName = new PersonNameType();
$personName->FirstName = $firstName;
$personName->LastName = $lastName;

//information about the payer
$payer = new PayerInfoType();
$payer->PayerName = $personName;
$payer->Address = $address;
$payer->PayerCountry = $_POST['country'];

$cardDetails = new CreditCardDetailsType();
$cardDetails->CreditCardNumber = $_POST['creditCardNumber'];
/*
*
Type of credit card. For UK, only Maestro, MasterCard, Discover, and
Visa are allowable. For Canada, only MasterCard and Visa are
allowable and Interac debit cards are not supported. It is one of the
following values:

* Visa
* MasterCard
* Discover
* Amex
* Solo
* Switch
* Maestro: See note.
`Note:
If the credit card type is Maestro, you must set currencyId to GBP.
In addition, you must specify either StartMonth and StartYear or
IssueNumber.`
*/
$cardDetails->CreditCardType = $_POST['creditCardType'];
$cardDetails->ExpMonth = $_POST['expDateMonth'];
$cardDetails->ExpYear = $_POST['expDateYear'];
$cardDetails->CVV2 = $_POST['cvv2Number'];
$cardDetails->CardOwner = $payer;

$ddReqDetails = new DoDirectPaymentRequestDetailsType();
$ddReqDetails->CreditCard = $cardDetails;
$ddReqDetails->PaymentDetails = $paymentDetails;
$ddReqDetails->PaymentAction = $_REQUEST['paymentType'];

$doDirectPaymentReq = new DoDirectPaymentReq();
$doDirectPaymentReq->DoDirectPaymentRequest = new DoDirectPaymentRequestType($ddReqDetails);

/*
* ## Creating service wrapper object
Creating service wrapper object to make API call and loading
Configuration::getAcctAndConfig() returns array that contains credential and config parameters
*/
$paypalService = new PayPalAPIInterfaceServiceService(Configuration::getAcctAndConfig());
try {
/* wrap API method calls on the service object with a try catch */
$doDirectPaymentResponse = $paypalService->DoDirectPayment($doDirectPaymentReq);
} catch (Exception $ex) {
include_once("../Error.php");
exit;
}
if (isset($doDirectPaymentResponse)) {
?>
<html>
<head>
<title>paypal payments via credit card</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>

<div id="main">
<div class="success_main_heading">
<center><h1>PayPal Payments via Credit Card</h1></center>
</div>
<div id="return">
<h2>Refund Status</h2>
<hr/>
<?php
//Rechecking the product price and currency details
if ($doDirectPaymentResponse->Ack == 'Success') {
echo "<h3 id='success'>Payment Successful</h3>";
echo "<P>Amount -" . $doDirectPaymentResponse->Amount->value . " (" . $doDirectPaymentResponse->Amount->currencyID . ")</P>";
echo "<P>Transaction ID -" . $doDirectPaymentResponse->TransactionID . "</P>";
echo "<div class='back_btn'><a href='index.php' id= 'btn'><< Back </a></div>";
} else {
echo "<h3 id='fail'>Payment - Failed</h3>";
echo '<p>Error msg - This transaction cannot be processed. <br>Please enter a valid credit card number and type.</p>';
echo "<div class='back_btn'><a href='index.php' id= 'btn'><< Back </a></div>";
}
?>
</div>
</div>
</body>
</html>
<?php
}
?>
Style.css

Includes basic styling of HTML elements.

/*----------------------------------------------
css settings for HTML div exactCenter
------------------------------------------------*/
@import url(http://fonts.googleapis.com/css?family=Raleway);
#main{
width:960px;
margin:50px auto;
font-family:raleway;
}
span{
color:red;
}
h2{
background-color: #FEFFED;
text-align:center;
border-radius: 10px 10px 0 0;
margin: -10px -40px;
padding: 15px;
}
hr{
border:0;
border-bottom:1px solid #ccc;
margin: 10px -40px;
margin-bottom: 30px;
}
#main_wrapper{
width: 100%;
}
#container{
width: 100%;
float: left;
border-radius: 10px;
font-family:raleway;
border: 2px solid #ccc;
padding: 10px 40px 25px;
margin-top: 22px;
margin-bottom: 40px;
margin-left: -42px;
}
input[type=text],input[type=password],select{
width: 50.5%;
padding: 10px;
margin-top: 8px;
border: 1px solid #ccc;
padding-left: 5px;
font-size: 16px;
font-family:raleway;
}
#buynow{
width: 50%;
background-color:#FFBC00;
color: white;
border: 2px solid #FFCB00;
padding: 10px;
font-size:20px;
cursor:pointer;
border-radius: 5px;
margin-bottom: 15px;
}
a#paynow{
/* width: 72%; */
background-color:#FFBC00;
color: white;
border: 2px solid #FFCB00;
padding: 15px 60px;
font-size:20px;
cursor:pointer;
border-radius: 5px;
/* margin: 0 0 0 394px; */
}
#profile{
padding:50px;
border:1px dashed grey;
font-size:20px;
background-color:#DCE6F7;
}

a{
text-decoration:none;
color: cornflowerblue;
}

i{
color: cornflowerblue;
}
#product{

width: 272px;
height: 500px;
border:1px solid #E7E7E5;
float: left;
margin-left: 34px;
}
#product p{
text-align: center;
margin-top: 30px;
}
#product h3{
text-align: center;
margin-top: -12px;
margin-bottom: 25px;
}
#product a{
text-align: center;
margin: 0 0 0 80px;
}
#td-label{
text-align: right;
font-weight: bold;
}
#date-div{
width: 28%;
/* height: 20px; */
/* border: 1px solid red; */
float: left;
}
#year-div{
width: 30%;
/* height: 31px; */
/* border: 1px solid red; */
float: left;
margin-left: -59px;
}
#product input[type=submit]{
text-align: center;
}
#return {
width: 492px;
height: 350px;
float: left;
border-radius: 10px;
font-family: raleway;
border: 2px solid #ccc;
padding: 10px 40px 11px;
}
#return h3#success {
text-align: center;
font-size: 24px;
margin-top: 50px;
color: green;
}
#return P {
text-align: center;
}
#return .back_btn {
margin-top: 51px;
text-align: center;
}
#btn {
width: 100%;
background-color: #FFBC00;
color: white;
border: 2px solid #FFCB00;
padding: 10px 70px;
font-size: 20px;
cursor: pointer;
border-radius: 5px;
margin-bottom: 15px;
margin: 0 auto;
}
a{
text-decoration:none;
color: cornflowerblue;
}
img#paypal_logo {
float: right;
margin-right: 20px;
margin-top: 1%;
padding-bottom: 15px;
}
.success_main_heading{
margin-left: -32%;
margin-bottom: 7%;

}
#return h3#fail{
text-align: center;
font-size: 24px;
margin-top: 50px;
color: red;
}
.red{
color:red;
font-weight: bold;
}
Conclusion :

Using the script will help you to collect the online payment using credit card via Paypal. Hope you will be benefited with that. Please share your feedback in the space provided below.

Thank you !

PHP Interview Questions with Solutions: Prepare for PHP Interview

PHP Interview Questions with Solutions: Prepare for PHP Interview

Prepare for PHP Interviews. Set Variable With php.ini File. Logic & Output Behind PHP Code Segment. Class Concept, Error & Functions in PHP. Start PHP Now!

Description
In this course you will be introduced with some tricky questions that everyone face during their interview. In each solutions I have included some useful functions which we generally use at the time of development also. I have covered the following area in my course with Questions, Attractive Presentations and Practical Solutions that will help you to understand the logic behind PHP in a different way.

Some useful functions
PHP error types
Class concept
Access specifiers public, private and protected
Set variable with php.ini file
Operators introduced in PHP7
Logic and its output behind some code segment
Basic knowledge
PHP7, XAMPP Server, Notepad++
What will you learn
This course is build for the person who is facing interviews. Every question is well explained with the practical solution through videos. So that everybody can prepare themselves for the tricky questions asked during interviews
To continue:

Advantages of Hiring PHP Developer for your Website Project

Advantages of Hiring PHP Developer for your Website Project

PHP - Hypertext pre-processor, a scripting language used by many people in developing web pages, but most of us are unaware even of the full form. To train someone and make them learn this whole language is as difficult and time-consuming as it is...

PHP - Hypertext pre-processor, a scripting language used by many people in developing web pages, but most of us are unaware even of the full form. To train someone and make them learn this whole language is as difficult and time-consuming as it is to learn the language yourself. That’s why PHP developers are there to make your life easy. This article will give us the advantages and requirements of Hire PHP Developer for our very own website project.

First of all, let us understand the value the right developer brings to the project and why it is important for your business.

A website is a major component of any company/business and is very important for its face value, the way it represents the company on the internet is critical for any business to succeed. This is the reason why companies are looking for PHP developers who can develop their webpage.

If you're planning to do an online business, your PHP programmer will be the first person to transfer your thinking onto the webpage. You should, therefore, employ developers from PHP to make your hypothetical idea a reality.

With this software programming language, PHP developers all-around can easily build website frameworks, web content management systems, web template systems, and various other web-based designs.

Some of the reasons why we need to outsource these developers are:

Not everyone is the best in each field, all of us have our specific skills and talents hence, PHP developers are also the best at what they do. The time and money spent on the training of the in house employees would be saved if the professional PHP developers are hired. Instead of multitasking, if the employees were to focus on what they’re good at it would increase productivity too.

The PHP developers would be much more professional than the in-house workers. It would lead to the seriousness of work. Hence, on-time delivery is guaranteed with hired PHP developers.

In addition to these benefits, you would also be able to track your project through every stage in constant communication with your online team. These advantages make it incredibly popular and smart to hire a PHP developer.

The PHP developers have in-depth knowledge of PHP, HTML and various frameworks in terms of technical capabilities. Hiring PHP developers are advised to give your website a professional look based on PHP.

Much of web success depends on the involvement of social media. The developer can add to your social networking pages a feature that explicitly redirects visitors. In addition, SEO experts also suggest better connections to the website's social network.

Just like a tailor stitches our dresses according to our preferences and is ready to make last-minute changes. A PHP developer will also be available at the nick of your call to make the website just the way you want it to be and have a customized solution for every problem.

Read also: Why & How to Hire Dedicated PHP Developer

At some point in your business, you’re going to have problems regarding your webpage due to the rapidly changing technology, instead of struggling with ideas like these and not being able to come up with an appropriate solution a PHP web developer could help us with our problems just like any technician would help us with the problems we face in our offices or any architect would help us with designing the structure of a building or any interior designer would help us with setting up our home. The PHP development company are hubs of workers who would help us overcome these problems and are always there.

Source by

PHP Programming Tutorial | Online PHP Certification Training

PHP Programming Tutorial | Online PHP Certification Training

Knowledge of PHP, the most popular back end language on the web can be yours, all at $9! Supplement your knowledge of html and JavaScript and add value to your CV. This course from Simpliv will make you a lot more employable in the market. Begin to take strides in your development career!

Description
This completes it.

PHP is the stepping stone to your first professional development gigs

PHP is the most popular back end language on the web.

Companies like Facebook and Tumblr use PHP as their primary back end coding language. It's in universal demands, and, as a new developer you're expected to know you're way around the front end and the back end. That's where PHP comes in.

There was a time when a web developer could get away with knowing just HTML and some Javascript, but now as employers are looking for more value, you have to know more. PHP lets you access an entire world of backend databases, like mySQL which is introduced in this course.

FACT: With PHP knowledge you'll be able to complete more advanced projects and be more employable.

People ask all the time: What's the best past to becoming a professional developer?

People going in to web development need two types of technical knowledge. First, they need to know how to manipulate content in a browser. That's where HTML5 and Javascript come in. But they also need to be able to interact with backend systems like eCommerce systems, databases and content management systems.

With PHP, developers:

Create systems by which data can be stored and retrieved in a database
Interact with eCommerce systems facilitating sales, credit card processing and shipping all over the world
Create complex content and customer management systems customized for industry use.
Create plugins and customizations for the most the most popular content management systems in the world, Wordpress, Drupal and Joomla (all of which are written in PHP!)
Who is the target audience?

New developers who want to add PHP to their tool aresneal
Web Designers who want to start writing code
Teachers and students
Current developers who need to learn PHP
Basic knowledge
Successful students in this course have a working knowledge of HTML
Successful students in this course can work with web browsers to navigate the internet
This course works on Mac or PC or even Linux with a few modifications
What will you learn
Set up a PHP Web Server
Integrate PHP with HTML code
Call PHP Pages from HTML
Use the echo() and print() functions
Integrate HTML with echo() and print() functions
Declare and use constants
Declare and initialize PHP variables
Understand the type of values held in PHP variables
Use arithmetic operators to perform math functions
Use comparison operators to make logical comparisons
Understand basic if statments
Create complex if statements which facilitate multiple outcomes
Use the PHP switch statement
Work with while loops.
Identify when a do while loop is appropriate and use it
Code a for loop
Create simple arrays
Use a for...each statement to loop through an array
Create associative arrays
Understand and use multidimensional arrays
Identify and use the superglobal arrays included in PHP
Use string functions to manipulate strings
Convert strings to arrays and vice-versa
Use hashes and encryption to enhance application security
Write simple functions
Write functions that take arguments and return a value
Read and write text files to the server
Read, write and parse CSV files
Set, read and delete cookies
Create sessions
Pass session variables between PHP pages
Expire sessions as required
Send plain text and HTML emails using PHP
Use a database to create a complete CRUD app
Store data in the database
Retrieve data from the database
Modify and delete database data
To continue: