Introduction to php 3

download Introduction to php   3

If you can't read please download the document

Transcript of Introduction to php 3

  1. 1. PC Technology Private Limited Introduction to PHP/MySQL
  2. 2. What have we done ? HTML Basic Formatting Tags Form Elements Input Types and Buttons Overview on how to run a PHP Application on Server A Simple PHP Application GET and POST Methods Print the data of the Forms Difference between Echo and Print
  3. 3. What next ? Information on Formatting and Coloring DIVs and SPANs Commenting in PHP PHP Case Senstivity Variable Declaration Rules for Declaring a variable in PHP Performing Operations
  4. 4. Formatting and Colors A HTML element has a default style for colors (background color is white and text color is black). HTML Style Attibute style="property : value // CSS Values Set a color for the background Setting a color for the Text This is a heading Setting a text size

    This is a paragraph.

  5. 5. Comments in PHP It is not executed by the program It is just for the reference of the developer Ways to write a comment Single Line Comments // # Multiple Line Comment /* _______ */
  6. 6. PHP Case Sensitivity Is PHP really case sensitive ? No !! All classes, functions, keywords and user defined functions are not case sensitive HOWEVER, Variable names are case sensitive $hello is different from $Hello
  7. 7. Variables in PHP There is no command to declare a variable The Declaration of a variable is done by preceding a $ sign in front of the desired variable name $name $add Normal Syntax follows : Strings should be declared in quotes, numbers without quotes Variables are used to store and manipulate the data.
  8. 8. Rules for declaring a variable Variable names are case-sensitive ($age and $AGE are two different variables) A variable name cannot start with a number A variable name should starts with the $ sign, followed by the desired name of the variable It is mandatory to start a variable name with a letter or an underscore character A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
  9. 9. Perform Mathematical Operations Five Mathematical Operations Addition ( + ) Subtraction ( - ) Multiplication ( * ) Division ( / ) Modulus ( % ) Declaration $a + $b; $c = $a + $b;
  10. 10. Thats all Folks !! QUERIES ??