SUBHASIS NAYAK CMC PHP, MYSQL
What we will discuss ? <ul><li>Here we will discuss what PHP is all about? </li></ul><ul><li>PHP MySql Apache installation...
What php is all about? <ul><li>PHP is hugely popular, and mostly used programming language for website’s backend process. ...
Continue ….. <ul><li>The PHP language is flexible and easy to learn quickly even if you have not done any programming in t...
Installing AMP <ul><li>It has three steps </li></ul><ul><ul><li>Installing Apache – it is very simple step by step. </li><...
Configure PHP <ul><li>To configure php go to “php.ini” </li></ul><ul><li>Search for “register_global” check it for if not ...
Basic architecture Browser Data base Middle Ware(PHP,JSP. ASP) Web server(Apache/IIS)
Variables  <ul><li>All variables start with ‘$’. </li></ul><ul><li>Variable starts with alpha numeric. </li></ul><ul><li>S...
Working with numbers You can do all mathematical operation like this?
Strings <ul><li>String is a collection of characters treated as single entity. </li></ul><ul><li>In PHP we put a string us...
Bypassing the special characters <ul><li>Some times we need to work with special characters which is used by the php. </li...
Cont’d ….. $str =“my Name is  “Papu”  ”; $str =“my Name is  “Papu”  ”; $str =‘my Name is  ‘Papu’  ‘; $str =‘my Name is  ’P...
Cont’d ….. <ul><li>Remember if you put a variable  </li></ul><ul><ul><li>in between double quote it will replace by it’s v...
String concatenation  <ul><li>We can join two strings using a (.) operator. </li></ul>
String comparison  <ul><li>We can compare two strings using <,>,<=,>=,== </li></ul>
 
Upcoming SlideShare
Loading in …5
×

Php, mysq lpart1

936 views

Published on

php mysql introduction, php variables

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

  • Be the first to like this

No Downloads
Views
Total views
936
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Php, mysq lpart1

  1. 1. SUBHASIS NAYAK CMC PHP, MYSQL
  2. 2. What we will discuss ? <ul><li>Here we will discuss what PHP is all about? </li></ul><ul><li>PHP MySql Apache installation </li></ul><ul><li>PHP basics. </li></ul><ul><ul><li>Variables & data types </li></ul></ul><ul><ul><li>Flow controls </li></ul></ul><ul><ul><li>Functions </li></ul></ul>
  3. 3. What php is all about? <ul><li>PHP is hugely popular, and mostly used programming language for website’s backend process. </li></ul><ul><li>IT is a programming language that was designed for making dynamic websites. </li></ul><ul><li>he name PHP is a recursive acronym that stands for PHP: Hypertext Preprocessor. </li></ul><ul><li>Hi! I am not with time to describe more about PHP. So go the site http://php.net and check it out. </li></ul>
  4. 4. Continue ….. <ul><li>The PHP language is flexible and easy to learn quickly even if you have not done any programming in the past. </li></ul><ul><li>If you have done any programming language like c, c++, java then you can learn PHP in one night. </li></ul>
  5. 5. Installing AMP <ul><li>It has three steps </li></ul><ul><ul><li>Installing Apache – it is very simple step by step. </li></ul></ul><ul><ul><li>Installing php – </li></ul></ul><ul><ul><ul><li>extract your php compressed package. Set the environment path. </li></ul></ul></ul><ul><ul><ul><li>To ‘conf ‘ folder of apache=>open httpd.conf and enable all belows </li></ul></ul></ul><ul><ul><ul><ul><li>LoadModule php5_module “///” </li></ul></ul></ul></ul><ul><ul><ul><ul><li>AddType application/x-httpd-php.php </li></ul></ul></ul></ul><ul><ul><ul><ul><li>AddTypeapplication/x-httpd-php-source.phps </li></ul></ul></ul></ul><ul><ul><li>Installing Mysql. </li></ul></ul><ul><ul><li>Doing configuration </li></ul></ul>
  6. 6. Configure PHP <ul><li>To configure php go to “php.ini” </li></ul><ul><li>Search for “register_global” check it for if not change it to off. </li></ul><ul><li>Search for “error_reporting and display errors”. When we are writing your code enable it by doing “E_ALL”. After production disable it by doing “E_NONE” </li></ul><ul><li>Change the session data to store in a particular folder to do so. “session.save_path=c:/windows/temp” </li></ul><ul><li>The default execution time is 3o seconds. It is not possible for some scripts to complete execution within 30 secs .you can change to 10 to 15 minutes. Put the value like this “max_executin time = 900” </li></ul>Save your “php.ini” & restart ur apache to get the effect.
  7. 7. Basic architecture Browser Data base Middle Ware(PHP,JSP. ASP) Web server(Apache/IIS)
  8. 8. Variables <ul><li>All variables start with ‘$’. </li></ul><ul><li>Variable starts with alpha numeric. </li></ul><ul><li>Stay away from using underscore from at start of variable. </li></ul><ul><li>Variable can contain alpha numeric. </li></ul>Good practice of writing variable $name $var1 $var_Name $varName
  9. 9. Working with numbers You can do all mathematical operation like this?
  10. 10. Strings <ul><li>String is a collection of characters treated as single entity. </li></ul><ul><li>In PHP we put a string using: </li></ul><ul><ul><li>Within two double quotes = “” </li></ul></ul><ul><ul><li>Within two single quotes = ‘’ </li></ul></ul>$myString = “Welcome to Open Source”; $myString = ‘Welcome to Open Source’;
  11. 11. Bypassing the special characters <ul><li>Some times we need to work with special characters which is used by the php. </li></ul><ul><li>Even some special characters are there for Mysql. </li></ul><ul><li>Some times we want to by pass the characters. </li></ul><ul><li>We have to by pass the double quote in between double quote. </li></ul><ul><li>We have to by pass the Single quote in between single quote. </li></ul><ul><li>To do that we need to use () back slash before the characters. </li></ul>
  12. 12. Cont’d ….. $str =“my Name is “Papu” ”; $str =“my Name is “Papu” ”; $str =‘my Name is ‘Papu’ ‘; $str =‘my Name is ’Papu’ ‘; $str =‘my Name is “Papu” ‘; $str =‘my Name is ”Papu” ‘; No need of () Stick with one style
  13. 13. Cont’d ….. <ul><li>Remember if you put a variable </li></ul><ul><ul><li>in between double quote it will replace by it’s value. </li></ul></ul><ul><ul><li>In between single it the variable will be displayed. </li></ul></ul>
  14. 14. String concatenation <ul><li>We can join two strings using a (.) operator. </li></ul>
  15. 15. String comparison <ul><li>We can compare two strings using <,>,<=,>=,== </li></ul>

×