0% found this document useful (0 votes)
7 views

PHP Programs - 55

The PHP code snippets show how to process form submissions, perform arithmetic calculations based on the selected operator, display output, and work with dates and times. Examples include adding numbers, finding a circle's area, calculating factorials, and displaying the current date and time using different PHP functions. The code is intended to

Uploaded by

rumeshavahora100
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

PHP Programs - 55

The PHP code snippets show how to process form submissions, perform arithmetic calculations based on the selected operator, display output, and work with dates and times. Examples include adding numbers, finding a circle's area, calculating factorials, and displaying the current date and time using different PHP functions. The code is intended to

Uploaded by

rumeshavahora100
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

b=lo

ehol'xbh'
lo$b=
$alo
<br> echo
fc) number
is ("'AddittA
oA echo
lo$a=
Values. number
cotine pea- ts opezathens authnetic petetww 1i
wok lab
10+1-
11 Pssitmnt-
Lol8/r21223 37 age
De38

prsq.2: Find aea tt Ciele wing


Cicle C=f; t *t.

$t= 4

ok Ciolef2)
echo C"Area

Preg.3 Pxint cuttont Dat ytma wing

<thP
$cuentpalo Tine=dat l'ym-d His')
echo CurentaleTimo

Cucent ala in

< php

echo C"cwrteat dato ptmo fdale >fotnat


Cmt y-m-d Hi:s), "<bh"

echo

echocucrent da ytine
Date
age 39

eclho C"cuwtan date y time!!


<br):

echo C Cuvent date tme t dat fotmat 'h:i A

the ntoed nnee iA odd se arer

HINL

<html>
Tbcdyiform achen="add eren php methal= 'pot
<input placahalde nte embet
typ"gexp" yelguird
inu telsubmit yalu = Calauat'

<) Phf
6-potl'n'J,
body </html
Valuo ="Autit type K0nput
Jsqpikad
name number zEntea plocaalatet <nyt
xbh JeQ9ted teat'
Jumbe' "Gnter plachol <ijt
Kbh Jaqyied
e nbez"umbee acchola=
atee pe"tea
<input
<
"pt> methecl
Khocye
<htn
HÌNL
hree
bbjY dalalidl. pt C"
eho
else
Dat
Phe

tnt= PosT C'n1]:


Sn3=s-fost 'nJ

cholce an opetat2 (+,-, t,


an aritnete spetahn band

paramale beteen to pagLes.

bodys
<input oeholde ="Nunber 1"

"Amb2 nnen2
rar
42
~inhut occlusllor ="opttat" Nonma="pray:
tipe =e"xqitedr <b
Sukoit
Ype' Vals 'aleulst'>
p
K/fotm
x/body

Php

$ ntzs_fosrnJi
sa2=posîC'n2

Caye '

beak
Cay';

breaki
lay'

beat
Case '
dii dod by2au
beak
di7ault
Submdt <php
type lrput
ta> ="gat vale'Submlt"
<br Kbr2
ac
chr namu "at tye Ciut
>Cotion <opion
s/opion
Mcoption> "cl Name Kselect
<b l'n name= tet'
wtiput
hp-seLE'D,Enlz
e SsERyeR
C'
hnfhp
echo "Amatod=
"Pot! name= <totm
body shhml
unber gin acodafy Sumof find iu.
ghennumber factorial
of iifind
Calats. Simyle DeKgn iL.
umker. given
cteatc, and akly 4pptepti
KVERC'fuesELf'J
Set() ioor $-GET
LJ, $-osTt, Use
operat
$rJald
s
43
Date
44

&n2 sis Sel-(-fosT C' n2"])s-fot"n2).. I"n2'2:

tt)
ccloC.".sa)

teho (n fibonacci riu:")

ieclo Pocta
"Flemp:y

Sun itt)

ase In2). bteak

dhsdy <(htnl>
Dcte

lo. Cteata an Wumeic end Gn eciatve


and display ih
<? th
(oo,to, Bu, 4o, 50)
(ittumi
'Secsnd =) vahoa';
ahy' Anand
echo Numbet
foz eachls numuic ovray advals
echo valun 2

Ach 'Ac0Btie

echo. Key
dat

<Php
4 today dat = dat Cymd):

dot 2y

oclu " Taday dat dbes not ndth 3y

You might also like