Your SlideShare is downloading. ×
0
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Php

106

Published on

Introductory Level

Introductory Level

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
106
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. What is PHP?PHP is an HTML-embedded scripting language. The goal of the language is to allow web developers to write dynamically generated pages quickly.
  • 2. PHP will allow you to: Reduce the time to create large websites it’s an Open Source Software. Create a customized user experience for visitors based on information that you have gathered from them
  • 3. What You Should KnowBefore starting this tutorial it is important that you have a basic understanding and experience in the following:HTML - Know the syntax and especially HTML forms.Basic programming knowledge - This isnt required, but if you have any traditional programming experience it will make learning PHP a great deal easier.
  • 4. PHP Syntax Syntax: The rules that must be followed to write properly structured code You can put your PHP code inside the body of HTML The PHP code is enclosed with <?php //your code here. ?>
  • 5. example<html><head> <title>Hello in PHP</title></head><body> <h1>Hello in PHP</h1> <? echo "Hello, world!“; ?></body></html>
  • 6. Example 2: HTML & PHP<html> <head> <title>My First PHP Page</title> </head> <body> <?php echo "Hello World!"; ?> </body> </html>
  • 7. PHP - Variables A variable is a means of storing a value, such as text string "Hello World!" or the integer value 4. A variable can then be reused throughout your code, instead of having to type out the actual value, over and over again. In PHP you define a variable with the following form:Example: $variable_name = Value;Description:If you forget that dollar sign at the beginning and the semi-colon at the end, it will not work. This is a common mistake for new PHP programmers!
  • 8. Outputting a String. PHP<?php echo "Hello!"; echo "<h5>I love using PHP!</h5>";?> Output Hello! I love using PHP!
  • 9. Using Comment in PHP Comments in PHP are similar to comments that are used in HTML. A comment is started with a special character sequence and all text that appears between the start of the comment and the end will be ignored by the browser. Single Line Comment // this a single line statement Multiple Line Comment /* this is a multiple line comment. */
  • 10. Creating HTML form<html><body> <h4>ABC Art Supply Order Form</h4> <form> <select> <option>Paint</option> <option>Brushes</option> <option>Erasers</option> </select> Quantity: <input type="text" /> <input type="submit" /> </form> </body></html>Output
  • 11. PHP Form Processor<html><body> <?php $quantity = $_POST[quantity]; $item = $_POST[item]; echo "You ordered ". $quantity . " " . $item . ".<br />"; echo "Thank you for ordering from ABC Art Supplies!"; ?> </body></html>

×