SlideShare a Scribd company logo
1 of 59
Download to read offline
Server Side Scripting Language for Dynamic Web Page Development

Open Source

Supports Large Number of Databases

It can work as Server Module or as Stand Alone CGI Script
Resembles C, C++ and Perl
HTTP Authentication
Cookies
Sessions
File Uploads
Remote File Handling
Persistent Database Connections
Command Line Interpretation
Portable Code
+ H OOR : R U OG
KWPO!
 KH D G !
    WL WOH !3 + 3 7 U D L Q L Q J  WL WOH !
  KH D G !
 E R G  E J F R OR U ) ) ) )   !




    E R G  !
 KWPO!
The Server Time Now 15:44:31
KWPO!
 KH D G !
    WL WOH !3 + 3 7 U D L Q L Q J  WL WOH !
  KH D G !
 E R G  E J F R OR U ) ) ) )   !



                                             !   quot;$ % '!
                                                  #% 
#



    E R G  !
 KWPO!
Welcome Trainees
KWPO!
 KH D G !
    WL WOH !3 + 3 7 U D L Q L Q J  WL WOH !
  KH D G !
 E R G  E J F R OR U ) ) ) )   !


(    )                 (*+,           - )
                                       #             .

/quot;(        )           0 #'
1
          2
                     (     )                             2
3


I R U P PH WKR G S R V W!
S D OL J Q F H Q WH U ! ( Q WH U  R X U 1 D PH
L Q S X W W S H WH [ W Q D PH P Q D PH !  S !
 I R U P!
     E R G  !
 KWPO!
+ +4   5




           6



7      

8              8   8 8
!       quot; #
        )

4,,9 ;
    :              (       =:

     
     /             (       # +
                           +
                   (       ? +
                            +         2
/   / 
     :            (       @ A

B ,;
 9                 (       A CD
                            A E
                   (       ,F @ 7
                             G ; :
7      H       )

;  $
  ;               (           ) # H!
                                quot;)      !  '
                   (           )quot;   9 H !E
                                       F     ;   ! I) J9! + + '
,4 :
  K7               (           I)  quot;
                                 7 '

           )

 ,= :
 :   7             (        ) L *L
                                 H )?
                                     quot;     8    MC   M 2'

 =99               (       H
quot; $
,                           (                   )   quot;(   '

(       ?E G
          N 2          E G
                        N                   
                                            /

(   O       D           P
                       E Q             /   : 
                                            :

(           QQ         ECP             B ,;
                                        9

(       (       C?R2   ECPR                 
                                            /
%    #
S        M   S   )                

(            S

(        P   S

(P           /                            H

(        *   S

(*           /                            =    

( T          S

(    U       /                    /
                               ; 7 /7      QV   E@

(           /                         S   M     : S 6
                                                 :  :
'   #   #
S   M                         S   )                  

6   quot;     ! Q'                S

6   quot;     E!2 W'''       2'   S

S   E G
     N                        /                               )   F

6   quot;#     !B 9:
             ;  '             S

6   quot;E     ! Q'               /                                  H

6   quot;*     *! Q'              S

6   quot;#              Q
                  !P '        /                                       ;

6   quot;**9 :
        / **!         '
                      =:      /                   I       7           : S 6
                                                                       :  :
(quot;       #
;       ,        

,                    :F                 H

    U
    O
    U                              !

    8   quot;                  #       $

            !%                    '   %

    R       quot;             (        )   %
(quot;    #
;
        ,   

,                :F                   H

                                 *

    O                      + %

    U                      + %

    8             #        + %       #

                          + %       

 R                (        + %       (

     C            ,        + %       ,
(quot;   #
4    ,       

,                 :F                         H

    X                  -    .

    Y                  /    .

                            .
    Z         0        1    .
                            .                               %
    [              2        %
                                    .               %   5
          3            44   %   3       !          *
                                    .               %   5
          )            66   %   )       7 %        *
(quot;   #
7          ,           

,                           :F                  H

                    +                 )8   +

                9                     )8   +

    0                   +    :        )8       +

                        +    46       )8       +

                                      )8       +
0                   9        :

                3                4    )8

            ;                    6    )8

            3           +    4        )8              +

            ;           +    6        )8                  +
(quot;   #
9        ,   

,                :F               H

; 6                        )8            )8

    ,                     )8           )8

,          0            )8           )8

    0             :        )8   )8

    XX                     )8            )8

    YY                     )8           )8




        ,

,                :F               H

    C                 ,
(quot;            #
:    7       ,

,                    :F                                 H

    ]            =    
                      ?        A
                              , @B        C                         ?   , @
                                                                         



:F H     ,

,                    :F                                 H

                                                  
    ^                     D ED                ,+ %     F  B
                                                            A



/            6            ,      

,                    :F                                 H

                                     9                 )        *
    OO
                                     )         *           9

                                     !                 )        *
    UU
                                     )         *           !
(quot;    #
;       ),
        ),   

,                    :F                      H

    O         8                     5   %

              +                 )8              %   G 
                                                      %

                                )8              %   G 
                                                      %
             9

    0        9 +      :         )8          +

             9 +      :         )8          +

0                9    :         )8




)       ,

,                    :F                      H

7                        HI       J
'   )*
if ($sex==‘M’)
{
echo “Welcome Sir”;
}


if ($sex==‘M’)
{
 echo “Welcome Sir”;
}else{
 echo “Welcome Madam”;
}


if ($sex==‘M’)
{
echo “Welcome Sir”;
}
elseif ($sex==‘F’)
{
 echo “Welcome Madam”;
}else{
 echo “Welcome”;
}
'   )*
if ($sex==‘M’):
echo “Welcome Sir”;
endif;



if ($sex==‘M’):
 echo “Welcome Sir”;
else:
 echo “Welcome Madam”;
ednif;



if ($sex==‘M’):
 echo “Welcome Sir”;
elseif ($sex==‘F’):
 echo “Welcome Madam”;
else:
 echo “Welcome”;
endif;
'                     +

while ($x10)
{
echo “The Value of X is u$x/u now br”;
$x++;
}




while ($x10):
echo “The Value of X is u$x/u now br”;
$x++;
endwhile;
'                     , - .


do
{
echo “The Value of X is u$x/u now br”;
$x++;
} while ($x=10)
'                      *


For($x=1; $x=10;$x++)
{
echo “The Value of X is u$x/u now br”;
}



For($x=1; ;$x++)
{
echo “The Value of X is u$x/u now br”;
If($x==10)break;
}



For(;;)
{
$x++; if($x10)break;
echo “The Value of X is u$x/u now br”;
}
'                      *


For($x=1; $x=10;$x++):
echo “The Value of X is u$x/u now br”;
endfor;




For($x=1; ;$x++):
echo “The Value of X is u$x/u now br”;
If($x==10)break;
endfor;




For(;;):
$x++; if($x10)break;
echo “The Value of X is u$x/u now br”;
endfor;
'                     *


$x = array (1,2,3,4,5,6,7,8,9,10);

foreach($x as $v)
{
echo “The Value of X is u$v/u now br”;
}




$x = array (“one”=1,”two”=2,”three”=3,”four”=4,”five”=5,
             “six”=6,”seven”=7,”eight”=8,”nine”=9,”ten”=10);

foreach($x as $p=$v)
{
echo “The Value of $p is u$v/u now br”;
}
'                       /


while($rows=8)
{ // Block 3
   for($col=1;$col=8;$col++)
   {     // Block 2
         foreach($x as $v)
            {     // Block 1
                  if($v==8) break;
                  if($v==0) break 2;
                  if($v0) break 3;
                  echo $v;
            }
         echo “br”;
   }
$rows++;
}
'


$i = 0;
while ($i++  5)
{
    echo “I am in Outer Zone brquot;;
    while (TRUE)
    {
        echo “Now in Middle Zone brquot;;
        while (TRUE)
        {
            echo “Now in Inner Zone brquot;;
            echo “-----------------------------------($i)br”;
            continue 3;
        }
        echo quot;This never gets outputquot;;
    }
    echo quot;Neither does thisquot;;
}
'              #.

Switch ($x)
{
case 1:
echo “Value   of X is 1 br“;
break;
case 2:
echo “Value   of X is 2 br“;
break;
case 3:
echo “Value   of X is 3 br“;
break;
case 4:
case 5:
echo “Value   of X is 4 br“;
break;
default:
echo “Value   of X is $x br”;
}
'              0   123   , 12


require ‘conf.php’;

require $conffile;

require (“conf,php”);




include ‘conf.php’;

include $conffile;

include (“conf,php”);
'                         0   4   123   , 4   12


require_once(‘conf.php’);

include_once($conffile);
5# 6 *        ,7       #


function hellow($x,$y=“, How are You?”)
{
echo “Hello $x $y br”;
}

hellow(‘Sir’);
hellow(‘Arjun’,’When Did You Come?’);
hellow(‘Ram’,’’);




Hello Sir, How are You?
Hello Arjun When Did You Come?
Hello Ram
7                      %      #


function power($x,$y)
{
$z=1;
for($a=1;$a=$y;$a++){$z *= $x;}
return $z;
}

echo “5sup2/sup = “ ,power(5,2), “br”;
echo “2sup5/sup = “ ,power(2,5), “br”;




52 = 25
25 = 32
%     7         #

function power($x,$y)
{
$z=1;
for($a=1;$a=$y;$a++){$z *= $x;}
return $z;
}
$pwr = ‘power’;

echo “5sup2/sup = “ ,$pwr(5,2), “br”;
echo “2sup5/sup = “ ,$pwr(2,5), “br”;


52 = 25
25 = 32
' ##
class LAMP
{
var $strength=0; var $trainee;
function Add_Trainee($name,$designation)
         {
         $this-strength++;
         $this-trainee[$this-strength]['id']=$this-strength;
         $this-trainee[$this-strength]['name']=$name;
         $this-trainee[$this-strength]['designation']=$designation;
         }
}
$Session1 = new LAMP;
$Session1-Add_Trainee('Loo','SDE');$Session1-Add_Trainee('Goo','JTO');
for($n=0; $n=$Session1-strength; $n++)
{
echo $Session1-trainee[$n]['id'], “...quot;, $Session1-trainee[$n]['name'],
quot;...quot;, $Session1-trainee[$n]['designation'], quot;brquot;;
}



1...Loo...SDE
2...Goo...JTO
' ## 8 )

class A
          {
          function X() {echo quot;I am From Function X of Class A brquot;;}
          }

class B extends A
         {
         function Y() { echo quot;I am From Function Y of Class B brquot;;}
         }

$var = new B;
echo $var-X();
echo $var-Y();




I am From Function X of Class A
I am From Function Y of Class B
9         7             #
;  $
  ; *7 = _

     )     )*   H 5quot;           )       H!       ` - M
                                                    !               *5 ) .'
                                                                         

(         )          )*      quot;
                          H 5(                  )N
                                                ! !    '
                                                       =:

;  $ : *: /
  ; *_ $ 
M         )*5 ) F quot;
               *                   F    5)!       )        '

(     5         )    *
                 *5 ) F  #
                          quot;                 ! ( H      '

;  $
  ; *    ; _
           9
M         )*        5quot;    )X           )!       M 5 H           -!   F   H    .'

     )*     quot;
           5 ( H         !#
                           +       S H '

,
M        quot;         )X    )-!              *      '
                                                   .

    quot; H
      (        '
6          ,         7   #
6; :

           quot;                 -!                 .'



            quot; Bb $
             a ! !      % a'

I/  /
  7 , I:
    F               quot;-M            * *       .'

(I)                      quot; '
                           =:

: 6; :
    )         quot;-                    .'
!              quot;
(       )          quot;'
7 ##                7                 #
7 $
 ,+

M        )quot;            H      !             '
                                                                      !quot;
(    )#
      quot;   C        !        C   '

B :
 ,+
    H             quot;                         !                 -M
                                                                 !          
                                                                           H *    H   *   -!   H
      F. '
        .
#
(                      quot;a             H           C F a aa
                                                         !  '

 ; /:
 : 6B 9
              quot;                     -M
                                     !             H *
                                                            H    *        -!    H       F. '
                                                                                            .
                                     $
        quot; )
          #            C F '

= 9 _
   /
M    H    5quot;                            -!   H                 F .'
%
=     5# )
       quot;           C F '
:                 7   #
J

     L quot;               '
           quot;               '
(          quot; '
           L (F

+,
H M             quot; H M       M !      H M   F '
      $
(         quot; !N
           (F '

;
           quot;            '

(           quot;Q
            N '

 6
 ;
           quot;-       !           F '
                                 .
                    $
(              quot;! Q Q
                   Q '
:     ; 7                   #
I$ J9 ,
     *7        :7

    H        ) L*
                              quot;-                      -
                                                         !          H       -
                                                                             !        -!
M            * 5-!             *    .. '
                                    ...
#                               quot;( !
(    F    ) L*
                         quot;#            !           !    A   Q    c'

I$ J9  ,
     *: 
         ) L*
                     quot;-  H                5*                .'
                                 quot;( !            )   *+
                                                     *              ,
         ) L*
                    quot;(   F'

I$ J9 : : *64
     * 97
M        ) L *
                    * Mquot;                   M *              -!   H       5*    .'
quot;                    $                           *
    ) L *
               * M # L'
                   quot;

I$ J9*J=: $
         
    H        ) L *L
                   H )quot;               LH )-!           H          5*       .'
                                                         quot;( !
(           ) L *L
                  H )#
                      quot;         8                         C H         '
=              7         #
: :
  7

        F        quot;    -!            )X H H -!       X   H *   . '
                                                                 .

F      quot;#     '

+;       =
                Hquot;        -!        X   H *       .'

       H ?V 2
          quot;     '
7          #
: ,
 7

               quot;                -
                                 !       CCC.'
#
         ? H
          $              ?! (

: + ,6:
  9
         ) F        quot;                   !               -!        .'
quot;
(    )        )     F       quot; !2! (9
                             ?           '

     :
     9
              quot;               '

                 quot; H
                  ?                               2'

    =4   
         M
          H  quot;                    !          -!             .'
                                     $
(             M quot; H
              H  ?                                    2 !@
                                                        !c '
95   = ) )  + )
                           '9 (

?php

if (!isset($_SERVER['PHP_AUTH_USER']))
{
    header('WWW-Authenticate: Basic realm=“Protectedquot;');
    header('HTTP/1.0 401 Unauthorized');
    echo ‘You Should Login to View the Content';
    exit;
} else {
    echo quot;pHello {$_SERVER['PHP_AUTH_USER']}./pquot;;
    echo quot;pYou entered {$_SERVER['PHP_AUTH_PW']} as your
password./pquot;;
}

?
'( ( ?)=

     #   / #       $%       quot;   $%    $%      $%
$%        $%        '


?php
start_session();
Setcookie(‘myuser’,‘trainee1’);
Setcookie(‘myuser’,‘trainee1’, time()+3600);
Setcookie(‘myuser’,‘trainee1’, time()+3600, ‘/olq’);
?



?php
echo $_COOKIE[‘myuser’];
?
= ) 
                               (

   (
?php
start_session();
$_SESSION[‘myuser’] = ‘trainee1’;
?

   )
?php
start_session();
echo $_SESSION[‘myuser’];
?
7         ,
html
body
 form method=post
p align=center Enter Your Name nbsp nbsp input type=text
name=mynamebr
input type=submit name=button value=Process
input type=hidden name=hiddenfield value=100
/p
 ?php
$button = $_POST['button'];
If($button!='')
{
$name = $_POST['myname'];
$hidden_value = $_POST['hiddenfield'];
$shrink = strlen($name);
echo quot;Your name b$name/b is of $shrink Character Length.
brquot;;
echo quot;Your Hidden Field Value is quot;, $hidden_value;
}
?
 /body
/html
LAMP_TRAINING_SESSION_7

More Related Content

What's hot

การสังเคราะห์ผลึกไททาเนียมไดออกไซด์
การสังเคราะห์ผลึกไททาเนียมไดออกไซด์การสังเคราะห์ผลึกไททาเนียมไดออกไซด์
การสังเคราะห์ผลึกไททาเนียมไดออกไซด์
Weeraman Buraso
 
59598225 thesis-slim
59598225 thesis-slim59598225 thesis-slim
59598225 thesis-slim
Thanh Nguyen
 

What's hot (14)

Snp tables documentation
Snp tables documentationSnp tables documentation
Snp tables documentation
 
Dadaísmo
DadaísmoDadaísmo
Dadaísmo
 
Aunty help
Aunty helpAunty help
Aunty help
 
C I E N C I A P A R A F I C A R R I C O
C I E N C I A  P A R A  F I C A R  R I C OC I E N C I A  P A R A  F I C A R  R I C O
C I E N C I A P A R A F I C A R R I C O
 
Bra
BraBra
Bra
 
Bhaarya akkato
Bhaarya akkatoBhaarya akkato
Bhaarya akkato
 
Feedback gulele &shuro meda 2009
Feedback gulele &shuro meda 2009Feedback gulele &shuro meda 2009
Feedback gulele &shuro meda 2009
 
การสังเคราะห์ผลึกไททาเนียมไดออกไซด์
การสังเคราะห์ผลึกไททาเนียมไดออกไซด์การสังเคราะห์ผลึกไททาเนียมไดออกไซด์
การสังเคราะห์ผลึกไททาเนียมไดออกไซด์
 
ESS-Bilbao Initiative Workshop. Overview of Multi-MW Accelerator Projects
ESS-Bilbao Initiative Workshop. Overview of Multi-MW Accelerator ProjectsESS-Bilbao Initiative Workshop. Overview of Multi-MW Accelerator Projects
ESS-Bilbao Initiative Workshop. Overview of Multi-MW Accelerator Projects
 
Anna bhaaryato
Anna bhaaryatoAnna bhaaryato
Anna bhaaryato
 
SURFmedia & MediaMosa
SURFmedia & MediaMosaSURFmedia & MediaMosa
SURFmedia & MediaMosa
 
Hijaama
HijaamaHijaama
Hijaama
 
Caballo de troya de descartes, de antonio hidalgo
Caballo de troya de descartes, de antonio hidalgoCaballo de troya de descartes, de antonio hidalgo
Caballo de troya de descartes, de antonio hidalgo
 
59598225 thesis-slim
59598225 thesis-slim59598225 thesis-slim
59598225 thesis-slim
 

Viewers also liked

Dorchestercollection
DorchestercollectionDorchestercollection
Dorchestercollection
Margaux
 
Dorchestercollection
DorchestercollectionDorchestercollection
Dorchestercollection
Margaux
 
Xeeva's Learning & Development - Transformation Consulting
Xeeva's Learning & Development - Transformation ConsultingXeeva's Learning & Development - Transformation Consulting
Xeeva's Learning & Development - Transformation Consulting
Gagan Bhalla - ITIL®, CSM®
 

Viewers also liked (20)

Bitcoin znak nowych czasów czy element starego porządku
Bitcoin  znak nowych czasów czy element starego porządkuBitcoin  znak nowych czasów czy element starego porządku
Bitcoin znak nowych czasów czy element starego porządku
 
Netcamp #8 - Ecoosystem.com - Innowacyjny startup
Netcamp #8 - Ecoosystem.com - Innowacyjny startupNetcamp #8 - Ecoosystem.com - Innowacyjny startup
Netcamp #8 - Ecoosystem.com - Innowacyjny startup
 
Narzedzia do pozycjonowania stron internetowych
Narzedzia do pozycjonowania stron internetowychNarzedzia do pozycjonowania stron internetowych
Narzedzia do pozycjonowania stron internetowych
 
Dorchestercollection
DorchestercollectionDorchestercollection
Dorchestercollection
 
Dorchestercollection
DorchestercollectionDorchestercollection
Dorchestercollection
 
The Heinz Endowments Youth Philanthropy Board Meeting
The Heinz Endowments Youth Philanthropy Board MeetingThe Heinz Endowments Youth Philanthropy Board Meeting
The Heinz Endowments Youth Philanthropy Board Meeting
 
Talenthouse - Ad Campaign
Talenthouse - Ad CampaignTalenthouse - Ad Campaign
Talenthouse - Ad Campaign
 
Potencjal API w e-commerce - Przemek Basiak, IAI
Potencjal API w e-commerce - Przemek Basiak, IAIPotencjal API w e-commerce - Przemek Basiak, IAI
Potencjal API w e-commerce - Przemek Basiak, IAI
 
Recession Times but Politicians Shine
Recession Times but Politicians ShineRecession Times but Politicians Shine
Recession Times but Politicians Shine
 
User Study Multitouch on Safari
User Study Multitouch on SafariUser Study Multitouch on Safari
User Study Multitouch on Safari
 
Xeeva's Learning & Development - Transformation Consulting
Xeeva's Learning & Development - Transformation ConsultingXeeva's Learning & Development - Transformation Consulting
Xeeva's Learning & Development - Transformation Consulting
 
Netcamp #8 - Koszulkowy startup
Netcamp #8 - Koszulkowy startupNetcamp #8 - Koszulkowy startup
Netcamp #8 - Koszulkowy startup
 
Zmysły rozszerzone - jak wearable computing zmienia świat - Paweł Surgiel
Zmysły rozszerzone - jak wearable computing zmienia świat - Paweł SurgielZmysły rozszerzone - jak wearable computing zmienia świat - Paweł Surgiel
Zmysły rozszerzone - jak wearable computing zmienia świat - Paweł Surgiel
 
SLOODLE 33 Slide In Italiano
SLOODLE 33 Slide In ItalianoSLOODLE 33 Slide In Italiano
SLOODLE 33 Slide In Italiano
 
2007 0516 Nj
2007 0516 Nj2007 0516 Nj
2007 0516 Nj
 
Robert Olejnik - Bezpieczeństwo w chmurach, czyli jak i dlaczego stworzyliśmy...
Robert Olejnik - Bezpieczeństwo w chmurach, czyli jak i dlaczego stworzyliśmy...Robert Olejnik - Bezpieczeństwo w chmurach, czyli jak i dlaczego stworzyliśmy...
Robert Olejnik - Bezpieczeństwo w chmurach, czyli jak i dlaczego stworzyliśmy...
 
Valco Mall 5/13/2004
Valco Mall 5/13/2004Valco Mall 5/13/2004
Valco Mall 5/13/2004
 
West Palm Beach, FL 3/24/2005
West Palm Beach, FL 3/24/2005West Palm Beach, FL 3/24/2005
West Palm Beach, FL 3/24/2005
 
Czy wearable car jest wizja przyszlosci?
Czy wearable car jest wizja przyszlosci?Czy wearable car jest wizja przyszlosci?
Czy wearable car jest wizja przyszlosci?
 
Google glass – kolejna rewolucja w tworzeniu aplikacji mobilnych
Google glass – kolejna rewolucja w tworzeniu aplikacji mobilnychGoogle glass – kolejna rewolucja w tworzeniu aplikacji mobilnych
Google glass – kolejna rewolucja w tworzeniu aplikacji mobilnych
 

Similar to LAMP_TRAINING_SESSION_7

Seeding Bugs To Find Bugs
Seeding Bugs To Find BugsSeeding Bugs To Find Bugs
TM_13 - Searching.pdf
TM_13 - Searching.pdfTM_13 - Searching.pdf
TM_13 - Searching.pdf
AhmadKurt
 
Plastic Bags
Plastic BagsPlastic Bags
Plastic Bags
tjokke
 
Moss Jacosbon Ems Pla 182 Final Submission 12 15 08
Moss Jacosbon   Ems Pla 182 Final Submission 12 15 08Moss Jacosbon   Ems Pla 182 Final Submission 12 15 08
Moss Jacosbon Ems Pla 182 Final Submission 12 15 08
mossbmw
 

Similar to LAMP_TRAINING_SESSION_7 (20)

Seeding Bugs To Find Bugs
Seeding Bugs To Find BugsSeeding Bugs To Find Bugs
Seeding Bugs To Find Bugs
 
Hamdeli 2
Hamdeli 2Hamdeli 2
Hamdeli 2
 
The Nielsen Company Mo Mo Intro June8th Buenos Aires
The Nielsen Company Mo Mo Intro   June8th Buenos AiresThe Nielsen Company Mo Mo Intro   June8th Buenos Aires
The Nielsen Company Mo Mo Intro June8th Buenos Aires
 
OpenSSO Microsoft Interop
OpenSSO Microsoft InteropOpenSSO Microsoft Interop
OpenSSO Microsoft Interop
 
TM_13 - Searching.pdf
TM_13 - Searching.pdfTM_13 - Searching.pdf
TM_13 - Searching.pdf
 
Huang Chinese
Huang ChineseHuang Chinese
Huang Chinese
 
06_Algebre_final.pdf
06_Algebre_final.pdf06_Algebre_final.pdf
06_Algebre_final.pdf
 
ESWC 2009 Lightning Talks
ESWC 2009 Lightning TalksESWC 2009 Lightning Talks
ESWC 2009 Lightning Talks
 
Plastic Bags
Plastic BagsPlastic Bags
Plastic Bags
 
Aturan nulis jw
Aturan nulis jwAturan nulis jw
Aturan nulis jw
 
Engaging Consumers - IFAA Conference
Engaging Consumers - IFAA ConferenceEngaging Consumers - IFAA Conference
Engaging Consumers - IFAA Conference
 
Baldwin's collection of islamic coins before 100 AH
Baldwin's collection of islamic coins before 100 AHBaldwin's collection of islamic coins before 100 AH
Baldwin's collection of islamic coins before 100 AH
 
SENAHMI CURVAS IDF.pdf
SENAHMI CURVAS IDF.pdfSENAHMI CURVAS IDF.pdf
SENAHMI CURVAS IDF.pdf
 
Creacion Y Evolucion Origen Presente Y Destino Un Estudio
Creacion Y Evolucion Origen Presente Y Destino Un Estudio Creacion Y Evolucion Origen Presente Y Destino Un Estudio
Creacion Y Evolucion Origen Presente Y Destino Un Estudio
 
EN-Hacking Securite Hand-Book.pdf
EN-Hacking Securite Hand-Book.pdfEN-Hacking Securite Hand-Book.pdf
EN-Hacking Securite Hand-Book.pdf
 
Moss Jacosbon Ems Pla 182 Final Submission 12 15 08
Moss Jacosbon   Ems Pla 182 Final Submission 12 15 08Moss Jacosbon   Ems Pla 182 Final Submission 12 15 08
Moss Jacosbon Ems Pla 182 Final Submission 12 15 08
 
LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6
 
apresentação BETA
apresentação BETAapresentação BETA
apresentação BETA
 
Layouts
LayoutsLayouts
Layouts
 
Sada bainama regularisation book
Sada bainama regularisation bookSada bainama regularisation book
Sada bainama regularisation book
 

More from umapst (7)

LAMP_TRAINING_SESSION_8
LAMP_TRAINING_SESSION_8LAMP_TRAINING_SESSION_8
LAMP_TRAINING_SESSION_8
 
LAMP_TRAINING_SESSION_5
LAMP_TRAINING_SESSION_5LAMP_TRAINING_SESSION_5
LAMP_TRAINING_SESSION_5
 
LAMP_TRAINING_SESSION_4
LAMP_TRAINING_SESSION_4LAMP_TRAINING_SESSION_4
LAMP_TRAINING_SESSION_4
 
LAMP_TRAINING_SESSION_3
LAMP_TRAINING_SESSION_3LAMP_TRAINING_SESSION_3
LAMP_TRAINING_SESSION_3
 
LAMP_TRAINING_SESSION_2
LAMP_TRAINING_SESSION_2LAMP_TRAINING_SESSION_2
LAMP_TRAINING_SESSION_2
 
LAMP_TRAINING_SESSION_1
LAMP_TRAINING_SESSION_1LAMP_TRAINING_SESSION_1
LAMP_TRAINING_SESSION_1
 
LAMP_TRAINING_SESSION_0
LAMP_TRAINING_SESSION_0LAMP_TRAINING_SESSION_0
LAMP_TRAINING_SESSION_0
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Recently uploaded (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 

LAMP_TRAINING_SESSION_7

  • 1.
  • 2. Server Side Scripting Language for Dynamic Web Page Development Open Source Supports Large Number of Databases It can work as Server Module or as Stand Alone CGI Script
  • 3. Resembles C, C++ and Perl HTTP Authentication Cookies Sessions File Uploads Remote File Handling Persistent Database Connections Command Line Interpretation Portable Code
  • 4.
  • 5. + H OOR : R U OG KWPO! KH D G ! WL WOH !3 + 3 7 U D L Q L Q J WL WOH ! KH D G ! E R G E J F R OR U ) ) ) ) ! E R G ! KWPO!
  • 6. The Server Time Now 15:44:31 KWPO! KH D G ! WL WOH !3 + 3 7 U D L Q L Q J WL WOH ! KH D G ! E R G E J F R OR U ) ) ) ) ! ! quot;$ % '! #% # E R G ! KWPO!
  • 7. Welcome Trainees KWPO! KH D G ! WL WOH !3 + 3 7 U D L Q L Q J WL WOH ! KH D G ! E R G E J F R OR U ) ) ) ) ! ( ) (*+, - ) # . /quot;( ) 0 #' 1 2 ( ) 2 3 I R U P PH WKR G S R V W! S D OL J Q F H Q WH U ! ( Q WH U R X U 1 D PH L Q S X W W S H WH [ W Q D PH P Q D PH ! S ! I R U P! E R G ! KWPO!
  • 8.
  • 9.
  • 10. + +4 5 6 7 8 8 8 8
  • 11.
  • 12. ! quot; # ) 4,,9 ; : ( =: / ( # + + ( ? + + 2 / / : ( @ A B ,; 9 ( A CD A E ( ,F @ 7 G ; : 7 H ) ; $ ; ( ) # H! quot;) ! ' ( )quot; 9 H !E F ; ! I) J9! + + ' ,4 : K7 ( I) quot; 7 ' ) ,= : : 7 ( ) L *L H )? quot; 8 MC M 2' =99 ( H
  • 13. quot; $ , ( ) quot;( ' ( ?E G N 2 E G N / ( O D P E Q / : : ( QQ ECP B ,; 9 ( ( C?R2 ECPR /
  • 14.
  • 15. % # S M S ) ( S ( P S (P / H ( * S (* / = ( T S ( U / / ; 7 /7 QV E@ ( / S M : S 6 : :
  • 16.
  • 17. ' # # S M S ) 6 quot; ! Q' S 6 quot; E!2 W''' 2' S S E G N / ) F 6 quot;# !B 9: ; ' S 6 quot;E ! Q' / H 6 quot;* *! Q' S 6 quot;# Q !P ' / ; 6 quot;**9 : / **! ' =: / I 7 : S 6 : :
  • 18.
  • 19. (quot; # ; , , :F H U O U ! 8 quot; # $ !% ' % R quot; ( ) %
  • 20. (quot; # ; , , :F H * O + % U + % 8 # + % # + % R ( + % ( C , + % ,
  • 21. (quot; # 4 , , :F H X - . Y / . . Z 0 1 . . % [ 2 % . % 5 3 44 % 3 ! * . % 5 ) 66 % ) 7 % *
  • 22. (quot; # 7 , , :F H + )8 + 9 )8 + 0 + : )8 + + 46 )8 + )8 + 0 9 : 3 4 )8 ; 6 )8 3 + 4 )8 + ; + 6 )8 +
  • 23. (quot; # 9 , , :F H ; 6 )8 )8 , )8 )8 , 0 )8 )8 0 : )8 )8 XX )8 )8 YY )8 )8 , , :F H C ,
  • 24. (quot; # : 7 , , :F H ] = ? A , @B C ? , @ :F H , , :F H ^ D ED ,+ % F B A / 6 , , :F H 9 ) * OO ) * 9 ! ) * UU ) * !
  • 25. (quot; # ; ), ), , :F H O 8 5 % + )8 % G % )8 % G % 9 0 9 + : )8 + 9 + : )8 + 0 9 : )8 ) , , :F H 7 HI J
  • 26.
  • 27. ' )* if ($sex==‘M’) { echo “Welcome Sir”; } if ($sex==‘M’) { echo “Welcome Sir”; }else{ echo “Welcome Madam”; } if ($sex==‘M’) { echo “Welcome Sir”; } elseif ($sex==‘F’) { echo “Welcome Madam”; }else{ echo “Welcome”; }
  • 28. ' )* if ($sex==‘M’): echo “Welcome Sir”; endif; if ($sex==‘M’): echo “Welcome Sir”; else: echo “Welcome Madam”; ednif; if ($sex==‘M’): echo “Welcome Sir”; elseif ($sex==‘F’): echo “Welcome Madam”; else: echo “Welcome”; endif;
  • 29. ' + while ($x10) { echo “The Value of X is u$x/u now br”; $x++; } while ($x10): echo “The Value of X is u$x/u now br”; $x++; endwhile;
  • 30. ' , - . do { echo “The Value of X is u$x/u now br”; $x++; } while ($x=10)
  • 31. ' * For($x=1; $x=10;$x++) { echo “The Value of X is u$x/u now br”; } For($x=1; ;$x++) { echo “The Value of X is u$x/u now br”; If($x==10)break; } For(;;) { $x++; if($x10)break; echo “The Value of X is u$x/u now br”; }
  • 32. ' * For($x=1; $x=10;$x++): echo “The Value of X is u$x/u now br”; endfor; For($x=1; ;$x++): echo “The Value of X is u$x/u now br”; If($x==10)break; endfor; For(;;): $x++; if($x10)break; echo “The Value of X is u$x/u now br”; endfor;
  • 33. ' * $x = array (1,2,3,4,5,6,7,8,9,10); foreach($x as $v) { echo “The Value of X is u$v/u now br”; } $x = array (“one”=1,”two”=2,”three”=3,”four”=4,”five”=5, “six”=6,”seven”=7,”eight”=8,”nine”=9,”ten”=10); foreach($x as $p=$v) { echo “The Value of $p is u$v/u now br”; }
  • 34. ' / while($rows=8) { // Block 3 for($col=1;$col=8;$col++) { // Block 2 foreach($x as $v) { // Block 1 if($v==8) break; if($v==0) break 2; if($v0) break 3; echo $v; } echo “br”; } $rows++; }
  • 35. ' $i = 0; while ($i++ 5) { echo “I am in Outer Zone brquot;; while (TRUE) { echo “Now in Middle Zone brquot;; while (TRUE) { echo “Now in Inner Zone brquot;; echo “-----------------------------------($i)br”; continue 3; } echo quot;This never gets outputquot;; } echo quot;Neither does thisquot;; }
  • 36. ' #. Switch ($x) { case 1: echo “Value of X is 1 br“; break; case 2: echo “Value of X is 2 br“; break; case 3: echo “Value of X is 3 br“; break; case 4: case 5: echo “Value of X is 4 br“; break; default: echo “Value of X is $x br”; }
  • 37. ' 0 123 , 12 require ‘conf.php’; require $conffile; require (“conf,php”); include ‘conf.php’; include $conffile; include (“conf,php”);
  • 38. ' 0 4 123 , 4 12 require_once(‘conf.php’); include_once($conffile);
  • 39.
  • 40. 5# 6 * ,7 # function hellow($x,$y=“, How are You?”) { echo “Hello $x $y br”; } hellow(‘Sir’); hellow(‘Arjun’,’When Did You Come?’); hellow(‘Ram’,’’); Hello Sir, How are You? Hello Arjun When Did You Come? Hello Ram
  • 41. 7 % # function power($x,$y) { $z=1; for($a=1;$a=$y;$a++){$z *= $x;} return $z; } echo “5sup2/sup = “ ,power(5,2), “br”; echo “2sup5/sup = “ ,power(2,5), “br”; 52 = 25 25 = 32
  • 42. % 7 # function power($x,$y) { $z=1; for($a=1;$a=$y;$a++){$z *= $x;} return $z; } $pwr = ‘power’; echo “5sup2/sup = “ ,$pwr(5,2), “br”; echo “2sup5/sup = “ ,$pwr(2,5), “br”; 52 = 25 25 = 32
  • 43.
  • 44. ' ## class LAMP { var $strength=0; var $trainee; function Add_Trainee($name,$designation) { $this-strength++; $this-trainee[$this-strength]['id']=$this-strength; $this-trainee[$this-strength]['name']=$name; $this-trainee[$this-strength]['designation']=$designation; } } $Session1 = new LAMP; $Session1-Add_Trainee('Loo','SDE');$Session1-Add_Trainee('Goo','JTO'); for($n=0; $n=$Session1-strength; $n++) { echo $Session1-trainee[$n]['id'], “...quot;, $Session1-trainee[$n]['name'], quot;...quot;, $Session1-trainee[$n]['designation'], quot;brquot;; } 1...Loo...SDE 2...Goo...JTO
  • 45. ' ## 8 ) class A { function X() {echo quot;I am From Function X of Class A brquot;;} } class B extends A { function Y() { echo quot;I am From Function Y of Class B brquot;;} } $var = new B; echo $var-X(); echo $var-Y(); I am From Function X of Class A I am From Function Y of Class B
  • 46.
  • 47. 9 7 # ; $ ; *7 = _ ) )* H 5quot; ) H! ` - M ! *5 ) .' ( ) )* quot; H 5( )N ! ! ' =: ; $ : *: / ; *_ $ M )*5 ) F quot; * F 5)! ) ' ( 5 ) * *5 ) F # quot; ! ( H ' ; $ ; * ; _ 9 M )* 5quot; )X )! M 5 H -! F H .' )* quot; 5 ( H !# + S H ' , M quot; )X )-! * ' . quot; H ( '
  • 48. 6 , 7 # 6; : quot; -! .' quot; Bb $ a ! ! % a' I/ / 7 , I: F quot;-M * * .' (I) quot; ' =: : 6; : ) quot;- .' ! quot; ( ) quot;'
  • 49. 7 ## 7 # 7 $ ,+ M )quot; H ! ' !quot; ( )# quot; C ! C ' B : ,+ H quot; ! -M ! H * H * -! H F. ' . # ( quot;a H C F a aa ! ' ; /: : 6B 9 quot; -M ! H * H * -! H F. ' . $ quot; ) # C F ' = 9 _ / M H 5quot; -! H F .' % = 5# ) quot; C F '
  • 50. : 7 # J L quot; ' quot; ' ( quot; ' L (F +, H M quot; H M M ! H M F ' $ ( quot; !N (F ' ; quot; ' ( quot;Q N ' 6 ; quot;- ! F ' . $ ( quot;! Q Q Q '
  • 51. : ; 7 # I$ J9 , *7 :7 H ) L* quot;- - ! H - ! -! M * 5-! * .. ' ... # quot;( ! ( F ) L* quot;# ! ! A Q c' I$ J9 , *: ) L* quot;- H 5* .' quot;( ! ) *+ * , ) L* quot;( F' I$ J9 : : *64 * 97 M ) L * * Mquot; M * -! H 5* .' quot; $ * ) L * * M # L' quot; I$ J9*J=: $ H ) L *L H )quot; LH )-! H 5* .' quot;( ! ( ) L *L H )# quot; 8 C H '
  • 52. = 7 # : : 7 F quot; -! )X H H -! X H * . ' . F quot;# ' +; = Hquot; -! X H * .' H ?V 2 quot; '
  • 53. 7 # : , 7 quot; - ! CCC.' # ? H $ ?! ( : + ,6: 9 ) F quot; ! -! .' quot; ( ) ) F quot; !2! (9 ? ' : 9 quot; ' quot; H ? 2' =4 M H quot; ! -! .' $ ( M quot; H H ? 2 !@ !c '
  • 54.
  • 55. 95 = ) ) + ) '9 ( ?php if (!isset($_SERVER['PHP_AUTH_USER'])) { header('WWW-Authenticate: Basic realm=“Protectedquot;'); header('HTTP/1.0 401 Unauthorized'); echo ‘You Should Login to View the Content'; exit; } else { echo quot;pHello {$_SERVER['PHP_AUTH_USER']}./pquot;; echo quot;pYou entered {$_SERVER['PHP_AUTH_PW']} as your password./pquot;; } ?
  • 56. '( ( ?)= # / # $% quot; $% $% $% $% $% ' ?php start_session(); Setcookie(‘myuser’,‘trainee1’); Setcookie(‘myuser’,‘trainee1’, time()+3600); Setcookie(‘myuser’,‘trainee1’, time()+3600, ‘/olq’); ? ?php echo $_COOKIE[‘myuser’]; ?
  • 57. = ) ( ( ?php start_session(); $_SESSION[‘myuser’] = ‘trainee1’; ? ) ?php start_session(); echo $_SESSION[‘myuser’]; ?
  • 58. 7 , html body form method=post p align=center Enter Your Name nbsp nbsp input type=text name=mynamebr input type=submit name=button value=Process input type=hidden name=hiddenfield value=100 /p ?php $button = $_POST['button']; If($button!='') { $name = $_POST['myname']; $hidden_value = $_POST['hiddenfield']; $shrink = strlen($name); echo quot;Your name b$name/b is of $shrink Character Length. brquot;; echo quot;Your Hidden Field Value is quot;, $hidden_value; } ? /body /html